Names

FUNCTION

createMethod

@skmtc/lang-typescript 0.19.1

Creates a class method identifier - a member of a class Index (toTsOasOperationIndexBase). Insert it through a projection with toIndex: at the file level it still renders as a member, which is not valid TypeScript there.

Signature

import { createMethod } from '@skmtc/lang-typescript'

createMethod(name: string): TsIdentifier

Parameters

name, string required
Example
const getPet = createMethod('getPet');
// TsDefinition renders: getPet(…): … { … }

Returns