Names
FUNCTION
@skmtc/lang-typescript 0.19.1createType
Creates a type identifier - a type-level entity that declares with type and imports type-only (import { type Foo }).
Signature
import { createType } from '@skmtc/lang-typescript'
createType(name: string, args?: CreateTypeArgs): TsIdentifierParameters
name, string required
args, CreateTypeArgs
exported, boolean
Whether the identifier is exported. Defaults to true.
Example
const userType = createType('User');
// TsDefinition renders: export type User = …;