Names

FUNCTION

createClass

@skmtc/lang-typescript 0.19.1

Creates a class identifier - a value entity that declares with class in block form (export class Name <heritage+body>) and imports as a plain named import. The projection's value carries any extends / implements heritage and the braced body.

Signature

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

createClass(name: string, args?: CreateDeclarationArgs): TsIdentifier

Parameters

name, string required
args, CreateDeclarationArgs
exported, boolean

Whether the identifier is exported. Defaults to true.

Example
const models = createClass('Models');
// TsDefinition renders: export class Models <value>

Returns