Names
FUNCTION
@skmtc/lang-typescript 0.19.1createProperty
Creates a class property 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 { createProperty } from '@skmtc/lang-typescript'
createProperty(name: string, args?: CreatePropertyArgs): TsIdentifierParameters
name, string required
args, CreatePropertyArgs
typeName, string
Example
const baseUrl = createProperty('baseUrl', { typeName: 'string' });
// TsDefinition renders: baseUrl: string = …;