Names

CLASS

TsIdentifier

@skmtc/lang-typescript 0.19.1

TypeScript's concrete IdentifierBase: adds the typed type (TsEntityType) the renderer reads to pick its declaration keyword (const / type) and its import form (plain / type-only).

Signature

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

class TsIdentifier extends IdentifierBase

Constructor

constructor

constructor(args: TsIdentifierArgs)

Properties

Per-language declaration type - const / type and import form.

Methods

declarationKey

declarationKey(): string

TypeScript's declaration slot is the declaration header <keyword> <name> (const thing, class Thing, declare namespace Thing) - exactly how the declaration opens. A class Foo and a declare namespace Foo are separate declarations the compiler merges, so the differing keyword keeps their keys distinct while exact repeats still collapse.

A class's members share one slot per name: a property and a method of one name are a TypeScript error, not a merge.