@vicin/sigil 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -18,11 +18,11 @@ declare const sigil: unique symbol;
18
18
  * @template L - Narrow string literal type representing the label.
19
19
  * @template P - Optinal parent to extend its '[sigil]'.
20
20
  */
21
- interface ISigilStatic<L extends string = string> {
21
+ interface ISigilStatic {
22
22
  /** Class-level label constant (identity). */
23
- readonly SigilLabel: L;
23
+ readonly SigilLabel: string;
24
24
  /** Class-level label constant (human readable). */
25
- readonly SigilEffectiveLabel: L;
25
+ readonly SigilEffectiveLabel: string;
26
26
  /**
27
27
  * Copy of the linearized sigil type label chain for the current constructor.
28
28
  * Useful for debugging.
@@ -109,7 +109,7 @@ interface ISigilInstance<L extends string = string, P extends Function = never>
109
109
  * @template L - Narrow string literal type for the label.
110
110
  * @template P - Optinal parent to extend its '[sigil]'.
111
111
  */
112
- type ISigil<L extends string = string, P extends Function = never> = ConstructorAbstract<ISigilInstance<L, P>> & ISigilStatic<L>;
112
+ type ISigil<L extends string = string, P extends Function = never> = ISigilStatic & ConstructorAbstract<ISigilInstance<L, P>>;
113
113
  /** Update '[sigil]' field for nominal typing */
114
114
  type ExtendSigil<L extends string, P extends ISigilInstance> = Prettify<IfNever<SigilOf<P>, {}> & {
115
115
  [K in L]: true;
@@ -169,8 +169,8 @@ type GetPrototype<T> = T extends {
169
169
  */
170
170
  declare const Sigil: {
171
171
  new (...args: any[]): {
172
- isOfType<T extends ISigilInstance>(this: T, other: unknown): other is T;
173
- isExactType<T extends ISigilInstance>(this: T, other: unknown): other is T;
172
+ isOfType<T>(this: T, other: unknown): other is T;
173
+ isExactType<T>(this: T, other: unknown): other is T;
174
174
  getSigilLabel(): string;
175
175
  getSigilEffectiveLabel(): string;
176
176
  getSigilLabelLineage(): readonly string[];
@@ -179,14 +179,12 @@ declare const Sigil: {
179
179
  Sigil: true;
180
180
  };
181
181
  };
182
- get SigilLabel(): "Sigil";
183
- get SigilEffectiveLabel(): "Sigil";
182
+ get SigilLabel(): string;
183
+ get SigilEffectiveLabel(): string;
184
184
  get SigilLabelLineage(): readonly string[];
185
185
  get SigilLabelSet(): Readonly<Set<string>>;
186
- isOfType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
187
- isExactType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
188
- } & {
189
- new (): {};
186
+ isOfType<T>(this: T, other: unknown): other is GetPrototype<T>;
187
+ isExactType<T>(this: T, other: unknown): other is GetPrototype<T>;
190
188
  };
191
189
  type Sigil = InstanceType<typeof Sigil>;
192
190
  /**
@@ -198,24 +196,24 @@ type Sigil = InstanceType<typeof Sigil>;
198
196
  */
199
197
  declare const SigilError: {
200
198
  new (...args: any[]): {
201
- isOfType<T extends ISigilInstance>(this: T, other: unknown): other is T;
202
- isExactType<T extends ISigilInstance>(this: T, other: unknown): other is T;
199
+ [sigil]: {
200
+ Sigil: true;
201
+ SigilError: true;
202
+ };
203
+ isOfType<T>(this: T, other: unknown): other is T;
204
+ isExactType<T>(this: T, other: unknown): other is T;
203
205
  getSigilLabel(): string;
204
206
  getSigilEffectiveLabel(): string;
205
207
  getSigilLabelLineage(): readonly string[];
206
208
  getSigilLabelSet(): Readonly<Set<string>>;
207
- readonly [sigil]: {
208
- Sigil: true;
209
- SigilError: true;
210
- };
211
209
  };
212
- get SigilLabel(): "SigilError";
213
- get SigilEffectiveLabel(): "SigilError";
210
+ get SigilLabel(): string;
211
+ get SigilEffectiveLabel(): string;
214
212
  get SigilLabelLineage(): readonly string[];
215
213
  get SigilLabelSet(): Readonly<Set<string>>;
216
- isOfType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
217
- isExactType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
218
- } & ErrorConstructor;
214
+ isOfType<T>(this: T, other: unknown): other is GetPrototype<T>;
215
+ isExactType<T>(this: T, other: unknown): other is GetPrototype<T>;
216
+ };
219
217
  type SigilError = InstanceType<typeof SigilError>;
220
218
 
221
219
  /** -----------------------------------------
@@ -281,11 +279,14 @@ declare const DEFAULT_LABEL_REGEX: RegExp;
281
279
  * @param opts - Options object to override any global options if needed.
282
280
  * @returns A class decorator compatible with the ECMAScript decorator context.
283
281
  */
284
- declare function WithSigil(label: string, opts?: SigilOptions): (value: Function, context: any) => void;
285
-
282
+ declare function AttachSigil(label: string, opts?: SigilOptions): (value: Function, context: any) => void;
286
283
  /**
287
- * HOF (class inhancer) that attaches runtime sigil metadata to Sigil class.
288
- * Alternative to '@WithSigil' if you prefer HOFs.
284
+ * @deprecated Use 'AttachSigil' instead, updated for clarity. will be removed in v4
285
+ */
286
+ declare const WithSigil: typeof AttachSigil;
287
+ /**
288
+ * Function that attaches runtime sigil metadata to Sigil class.
289
+ * Alternative to '@AttachSigil' if you prefer normal functions.
289
290
  *
290
291
  * @typeParam S - Constructor type (should be an instance of sigil class).
291
292
  * @param Class - The constructor (class) to enhance.
@@ -293,7 +294,11 @@ declare function WithSigil(label: string, opts?: SigilOptions): (value: Function
293
294
  * @param opts - Options object to override any global options if needed.
294
295
  * @returns The same constructor value, with runtime metadata ensured.
295
296
  */
296
- declare function withSigil<S extends Function>(Class: S, label: string, opts?: SigilOptions): S;
297
+ declare function attachSigil<S extends Function>(Class: S, label: string, opts?: SigilOptions): S;
298
+ /**
299
+ * @deprecated Use 'attachSigil' instead, updated for clarity. will be removed in v4
300
+ */
301
+ declare const withSigil: typeof attachSigil;
297
302
 
298
303
  /** -----------------------------------------
299
304
  * Inspection helpers
@@ -328,8 +333,11 @@ declare function getSigilLabels(): string[];
328
333
  * @returns A new constructor that extends `Base` and includes Sigil statics/instance methods.
329
334
  * @throws Error if `Base` is already sigilified.
330
335
  */
331
- declare function Sigilify<B extends Constructor, L extends string>(Base: B, label: L, opts?: SigilOptions): {
336
+ declare function Sigilify<L extends string>(Base: Constructor, label: L, opts?: SigilOptions): {
332
337
  new (...args: any[]): {
338
+ [sigil]: {
339
+ Sigil: true;
340
+ } & { [K_1 in L]: true; } extends infer T ? { [K in keyof T]: T[K]; } : never;
333
341
  /**
334
342
  * Check whether `other` is (or inherits from) the instance represented by the
335
343
  * calling constructor.
@@ -342,7 +350,7 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
342
350
  * @param other - The object to test.
343
351
  * @returns A type guard asserting `other` is an instance of the constructor.
344
352
  */
345
- isOfType<T extends ISigilInstance>(this: T, other: unknown): other is T;
353
+ isOfType<T_1>(this: T_1, other: unknown): other is T_1;
346
354
  /**
347
355
  * Check whether `other` is exactly the same instance represented by the
348
356
  * calling constructor.
@@ -352,7 +360,7 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
352
360
  * @param other - The object to test.
353
361
  * @returns A type guard asserting `other` is an instance of the constructor.
354
362
  */
355
- isExactType<T extends ISigilInstance>(this: T, other: unknown): other is T;
363
+ isExactType<T_1>(this: T_1, other: unknown): other is T_1;
356
364
  /**
357
365
  * Returns the identity sigil label of this instance's constructor.
358
366
  *
@@ -374,24 +382,19 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
374
382
  /**
375
383
  * Returns a copy of the sigil type label lineage set for this instance's constructor.
376
384
  *
385
+ * @deprecated To minize API and bundle size, internally this method is 'new Set(this.SigilLabelLineage)' only. will be removed in v4
377
386
  * @returns readonly array of labels representing the type lineage.
378
387
  */
379
388
  getSigilLabelSet(): Readonly<Set<string>>;
380
- /**
381
- * Compile-time nominal brand that encodes the class sigil labels object.
382
- */
383
- readonly [sigil]: {
384
- Sigil: true;
385
- } & { [K_1 in L]: true; } extends infer T ? { [K in keyof T]: T[K]; } : never;
386
389
  };
387
390
  /**
388
391
  * Class-level identity label constant for this sigil constructor.
389
392
  */
390
- get SigilLabel(): L;
393
+ get SigilLabel(): string;
391
394
  /**
392
395
  * Class-level human-readable label constant for this sigil constructor, last passed label in 'Sigil' chain by developer.
393
396
  */
394
- get SigilEffectiveLabel(): L;
397
+ get SigilEffectiveLabel(): string;
395
398
  /**
396
399
  * Linearized sigil type label chain for the current constructor.
397
400
  *
@@ -404,6 +407,7 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
404
407
  * Sigil type label set for the current constructor.
405
408
  * Useful for debugging.
406
409
  *
410
+ * @deprecated To minize API and bundle size, internally this method is 'new Set(this.SigilLabelLineage)' only. will be removed in v4
407
411
  * @returns A Readonly Set of labels that represent the type lineage.
408
412
  */
409
413
  get SigilLabelSet(): Readonly<Set<string>>;
@@ -419,7 +423,7 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
419
423
  * @param other - The object to test.
420
424
  * @returns A type guard asserting `other` is an instance of the constructor.
421
425
  */
422
- isOfType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
426
+ isOfType<T>(this: T, other: unknown): other is GetPrototype<T>;
423
427
  /**
424
428
  * Check whether `other` is exactly the same instance represented by the
425
429
  * calling constructor.
@@ -429,8 +433,8 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
429
433
  * @param other - The object to test.
430
434
  * @returns A type guard asserting `other` is an instance of the constructor.
431
435
  */
432
- isExactType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
433
- } & B;
436
+ isExactType<T>(this: T, other: unknown): other is GetPrototype<T>;
437
+ };
434
438
  /**
435
439
  * Mixin factory that augments an existing class with Sigil runtime metadata and helpers. Accept and return 'abstract' class.
436
440
  *
@@ -440,7 +444,10 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
440
444
  * @returns A new abstract constructor that extends `Base` and includes Sigil statics/instance methods.
441
445
  * @throws Error if `Base` is already sigilified.
442
446
  */
443
- declare function SigilifyAbstract<B extends ConstructorAbstract, L extends string>(Base: B, label: L, opts?: SigilOptions): ((abstract new (...args: any[]) => {
447
+ declare function SigilifyAbstract<L extends string>(Base: ConstructorAbstract, label: L, opts?: SigilOptions): (abstract new (...args: any[]) => {
448
+ [sigil]: {
449
+ Sigil: true;
450
+ } & { [K_1 in L]: true; } extends infer T ? { [K in keyof T]: T[K]; } : never;
444
451
  /**
445
452
  * Check whether `other` is (or inherits from) the instance represented by the
446
453
  * calling constructor.
@@ -453,7 +460,7 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
453
460
  * @param other - The object to test.
454
461
  * @returns A type guard asserting `other` is an instance of the constructor.
455
462
  */
456
- isOfType<T>(this: T, other: unknown): other is T;
463
+ isOfType<T_1>(this: T_1, other: unknown): other is T_1;
457
464
  /**
458
465
  * Check whether `other` is exactly the same instance represented by the
459
466
  * calling constructor.
@@ -463,7 +470,7 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
463
470
  * @param other - The object to test.
464
471
  * @returns A type guard asserting `other` is an instance of the constructor.
465
472
  */
466
- isExactType<T>(this: T, other: unknown): other is T;
473
+ isExactType<T_1>(this: T_1, other: unknown): other is T_1;
467
474
  /**
468
475
  * Returns the identity sigil label of this instance's constructor.
469
476
  *
@@ -485,24 +492,19 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
485
492
  /**
486
493
  * Returns a copy of the sigil type label lineage set for this instance's constructor.
487
494
  *
495
+ * @deprecated To minize API and bundle size, internally this method is 'new Set(this.SigilLabelLineage)' only. will be removed in v4
488
496
  * @returns readonly array of labels representing the type lineage.
489
497
  */
490
498
  getSigilLabelSet(): Readonly<Set<string>>;
491
- /**
492
- * Compile-time nominal brand that encodes the class sigil labels object.
493
- */
494
- readonly [sigil]: {
495
- Sigil: true;
496
- } & { [K_1 in L]: true; } extends infer T ? { [K in keyof T]: T[K]; } : never;
497
499
  }) & {
498
500
  /**
499
501
  * Class-level identity label constant for this sigil constructor.
500
502
  */
501
- get SigilLabel(): L;
503
+ get SigilLabel(): string;
502
504
  /**
503
505
  * Class-level human-readable label constant for this sigil constructor, last passed label in 'Sigil' chain by developer.
504
506
  */
505
- get SigilEffectiveLabel(): L;
507
+ get SigilEffectiveLabel(): string;
506
508
  /**
507
509
  * Linearized sigil type label chain for the current constructor.
508
510
  *
@@ -515,6 +517,7 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
515
517
  * Sigil type label set for the current constructor.
516
518
  * Useful for debugging.
517
519
  *
520
+ * @deprecated To minize API and bundle size, internally this method is 'new Set(this.SigilLabelLineage)' only. will be removed in v4
518
521
  * @returns A Readonly Set of labels that represent the type lineage.
519
522
  */
520
523
  get SigilLabelSet(): Readonly<Set<string>>;
@@ -541,6 +544,6 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
541
544
  * @returns A type guard asserting `other` is an instance of the constructor.
542
545
  */
543
546
  isExactType<T>(this: T, other: unknown): other is GetPrototype<T>;
544
- }) & B;
547
+ };
545
548
 
546
- export { DEFAULT_LABEL_REGEX, type ExtendSigil, type GetPrototype, type ISigil, type ISigilInstance, type ISigilStatic, RECOMMENDED_LABEL_REGEX, Sigil, SigilError, type SigilOf, type SigilOptions, Sigilify, SigilifyAbstract, WithSigil, getSigilLabels, isSigilCtor, isSigilInstance, sigil, updateSigilOptions, withSigil };
549
+ export { AttachSigil, DEFAULT_LABEL_REGEX, type ExtendSigil, type GetPrototype, type ISigil, type ISigilInstance, type ISigilStatic, RECOMMENDED_LABEL_REGEX, Sigil, SigilError, type SigilOf, type SigilOptions, Sigilify, SigilifyAbstract, WithSigil, attachSigil, getSigilLabels, isSigilCtor, isSigilInstance, sigil, updateSigilOptions, withSigil };
package/dist/index.d.ts CHANGED
@@ -18,11 +18,11 @@ declare const sigil: unique symbol;
18
18
  * @template L - Narrow string literal type representing the label.
19
19
  * @template P - Optinal parent to extend its '[sigil]'.
20
20
  */
21
- interface ISigilStatic<L extends string = string> {
21
+ interface ISigilStatic {
22
22
  /** Class-level label constant (identity). */
23
- readonly SigilLabel: L;
23
+ readonly SigilLabel: string;
24
24
  /** Class-level label constant (human readable). */
25
- readonly SigilEffectiveLabel: L;
25
+ readonly SigilEffectiveLabel: string;
26
26
  /**
27
27
  * Copy of the linearized sigil type label chain for the current constructor.
28
28
  * Useful for debugging.
@@ -109,7 +109,7 @@ interface ISigilInstance<L extends string = string, P extends Function = never>
109
109
  * @template L - Narrow string literal type for the label.
110
110
  * @template P - Optinal parent to extend its '[sigil]'.
111
111
  */
112
- type ISigil<L extends string = string, P extends Function = never> = ConstructorAbstract<ISigilInstance<L, P>> & ISigilStatic<L>;
112
+ type ISigil<L extends string = string, P extends Function = never> = ISigilStatic & ConstructorAbstract<ISigilInstance<L, P>>;
113
113
  /** Update '[sigil]' field for nominal typing */
114
114
  type ExtendSigil<L extends string, P extends ISigilInstance> = Prettify<IfNever<SigilOf<P>, {}> & {
115
115
  [K in L]: true;
@@ -169,8 +169,8 @@ type GetPrototype<T> = T extends {
169
169
  */
170
170
  declare const Sigil: {
171
171
  new (...args: any[]): {
172
- isOfType<T extends ISigilInstance>(this: T, other: unknown): other is T;
173
- isExactType<T extends ISigilInstance>(this: T, other: unknown): other is T;
172
+ isOfType<T>(this: T, other: unknown): other is T;
173
+ isExactType<T>(this: T, other: unknown): other is T;
174
174
  getSigilLabel(): string;
175
175
  getSigilEffectiveLabel(): string;
176
176
  getSigilLabelLineage(): readonly string[];
@@ -179,14 +179,12 @@ declare const Sigil: {
179
179
  Sigil: true;
180
180
  };
181
181
  };
182
- get SigilLabel(): "Sigil";
183
- get SigilEffectiveLabel(): "Sigil";
182
+ get SigilLabel(): string;
183
+ get SigilEffectiveLabel(): string;
184
184
  get SigilLabelLineage(): readonly string[];
185
185
  get SigilLabelSet(): Readonly<Set<string>>;
186
- isOfType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
187
- isExactType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
188
- } & {
189
- new (): {};
186
+ isOfType<T>(this: T, other: unknown): other is GetPrototype<T>;
187
+ isExactType<T>(this: T, other: unknown): other is GetPrototype<T>;
190
188
  };
191
189
  type Sigil = InstanceType<typeof Sigil>;
192
190
  /**
@@ -198,24 +196,24 @@ type Sigil = InstanceType<typeof Sigil>;
198
196
  */
199
197
  declare const SigilError: {
200
198
  new (...args: any[]): {
201
- isOfType<T extends ISigilInstance>(this: T, other: unknown): other is T;
202
- isExactType<T extends ISigilInstance>(this: T, other: unknown): other is T;
199
+ [sigil]: {
200
+ Sigil: true;
201
+ SigilError: true;
202
+ };
203
+ isOfType<T>(this: T, other: unknown): other is T;
204
+ isExactType<T>(this: T, other: unknown): other is T;
203
205
  getSigilLabel(): string;
204
206
  getSigilEffectiveLabel(): string;
205
207
  getSigilLabelLineage(): readonly string[];
206
208
  getSigilLabelSet(): Readonly<Set<string>>;
207
- readonly [sigil]: {
208
- Sigil: true;
209
- SigilError: true;
210
- };
211
209
  };
212
- get SigilLabel(): "SigilError";
213
- get SigilEffectiveLabel(): "SigilError";
210
+ get SigilLabel(): string;
211
+ get SigilEffectiveLabel(): string;
214
212
  get SigilLabelLineage(): readonly string[];
215
213
  get SigilLabelSet(): Readonly<Set<string>>;
216
- isOfType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
217
- isExactType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
218
- } & ErrorConstructor;
214
+ isOfType<T>(this: T, other: unknown): other is GetPrototype<T>;
215
+ isExactType<T>(this: T, other: unknown): other is GetPrototype<T>;
216
+ };
219
217
  type SigilError = InstanceType<typeof SigilError>;
220
218
 
221
219
  /** -----------------------------------------
@@ -281,11 +279,14 @@ declare const DEFAULT_LABEL_REGEX: RegExp;
281
279
  * @param opts - Options object to override any global options if needed.
282
280
  * @returns A class decorator compatible with the ECMAScript decorator context.
283
281
  */
284
- declare function WithSigil(label: string, opts?: SigilOptions): (value: Function, context: any) => void;
285
-
282
+ declare function AttachSigil(label: string, opts?: SigilOptions): (value: Function, context: any) => void;
286
283
  /**
287
- * HOF (class inhancer) that attaches runtime sigil metadata to Sigil class.
288
- * Alternative to '@WithSigil' if you prefer HOFs.
284
+ * @deprecated Use 'AttachSigil' instead, updated for clarity. will be removed in v4
285
+ */
286
+ declare const WithSigil: typeof AttachSigil;
287
+ /**
288
+ * Function that attaches runtime sigil metadata to Sigil class.
289
+ * Alternative to '@AttachSigil' if you prefer normal functions.
289
290
  *
290
291
  * @typeParam S - Constructor type (should be an instance of sigil class).
291
292
  * @param Class - The constructor (class) to enhance.
@@ -293,7 +294,11 @@ declare function WithSigil(label: string, opts?: SigilOptions): (value: Function
293
294
  * @param opts - Options object to override any global options if needed.
294
295
  * @returns The same constructor value, with runtime metadata ensured.
295
296
  */
296
- declare function withSigil<S extends Function>(Class: S, label: string, opts?: SigilOptions): S;
297
+ declare function attachSigil<S extends Function>(Class: S, label: string, opts?: SigilOptions): S;
298
+ /**
299
+ * @deprecated Use 'attachSigil' instead, updated for clarity. will be removed in v4
300
+ */
301
+ declare const withSigil: typeof attachSigil;
297
302
 
298
303
  /** -----------------------------------------
299
304
  * Inspection helpers
@@ -328,8 +333,11 @@ declare function getSigilLabels(): string[];
328
333
  * @returns A new constructor that extends `Base` and includes Sigil statics/instance methods.
329
334
  * @throws Error if `Base` is already sigilified.
330
335
  */
331
- declare function Sigilify<B extends Constructor, L extends string>(Base: B, label: L, opts?: SigilOptions): {
336
+ declare function Sigilify<L extends string>(Base: Constructor, label: L, opts?: SigilOptions): {
332
337
  new (...args: any[]): {
338
+ [sigil]: {
339
+ Sigil: true;
340
+ } & { [K_1 in L]: true; } extends infer T ? { [K in keyof T]: T[K]; } : never;
333
341
  /**
334
342
  * Check whether `other` is (or inherits from) the instance represented by the
335
343
  * calling constructor.
@@ -342,7 +350,7 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
342
350
  * @param other - The object to test.
343
351
  * @returns A type guard asserting `other` is an instance of the constructor.
344
352
  */
345
- isOfType<T extends ISigilInstance>(this: T, other: unknown): other is T;
353
+ isOfType<T_1>(this: T_1, other: unknown): other is T_1;
346
354
  /**
347
355
  * Check whether `other` is exactly the same instance represented by the
348
356
  * calling constructor.
@@ -352,7 +360,7 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
352
360
  * @param other - The object to test.
353
361
  * @returns A type guard asserting `other` is an instance of the constructor.
354
362
  */
355
- isExactType<T extends ISigilInstance>(this: T, other: unknown): other is T;
363
+ isExactType<T_1>(this: T_1, other: unknown): other is T_1;
356
364
  /**
357
365
  * Returns the identity sigil label of this instance's constructor.
358
366
  *
@@ -374,24 +382,19 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
374
382
  /**
375
383
  * Returns a copy of the sigil type label lineage set for this instance's constructor.
376
384
  *
385
+ * @deprecated To minize API and bundle size, internally this method is 'new Set(this.SigilLabelLineage)' only. will be removed in v4
377
386
  * @returns readonly array of labels representing the type lineage.
378
387
  */
379
388
  getSigilLabelSet(): Readonly<Set<string>>;
380
- /**
381
- * Compile-time nominal brand that encodes the class sigil labels object.
382
- */
383
- readonly [sigil]: {
384
- Sigil: true;
385
- } & { [K_1 in L]: true; } extends infer T ? { [K in keyof T]: T[K]; } : never;
386
389
  };
387
390
  /**
388
391
  * Class-level identity label constant for this sigil constructor.
389
392
  */
390
- get SigilLabel(): L;
393
+ get SigilLabel(): string;
391
394
  /**
392
395
  * Class-level human-readable label constant for this sigil constructor, last passed label in 'Sigil' chain by developer.
393
396
  */
394
- get SigilEffectiveLabel(): L;
397
+ get SigilEffectiveLabel(): string;
395
398
  /**
396
399
  * Linearized sigil type label chain for the current constructor.
397
400
  *
@@ -404,6 +407,7 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
404
407
  * Sigil type label set for the current constructor.
405
408
  * Useful for debugging.
406
409
  *
410
+ * @deprecated To minize API and bundle size, internally this method is 'new Set(this.SigilLabelLineage)' only. will be removed in v4
407
411
  * @returns A Readonly Set of labels that represent the type lineage.
408
412
  */
409
413
  get SigilLabelSet(): Readonly<Set<string>>;
@@ -419,7 +423,7 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
419
423
  * @param other - The object to test.
420
424
  * @returns A type guard asserting `other` is an instance of the constructor.
421
425
  */
422
- isOfType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
426
+ isOfType<T>(this: T, other: unknown): other is GetPrototype<T>;
423
427
  /**
424
428
  * Check whether `other` is exactly the same instance represented by the
425
429
  * calling constructor.
@@ -429,8 +433,8 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
429
433
  * @param other - The object to test.
430
434
  * @returns A type guard asserting `other` is an instance of the constructor.
431
435
  */
432
- isExactType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
433
- } & B;
436
+ isExactType<T>(this: T, other: unknown): other is GetPrototype<T>;
437
+ };
434
438
  /**
435
439
  * Mixin factory that augments an existing class with Sigil runtime metadata and helpers. Accept and return 'abstract' class.
436
440
  *
@@ -440,7 +444,10 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
440
444
  * @returns A new abstract constructor that extends `Base` and includes Sigil statics/instance methods.
441
445
  * @throws Error if `Base` is already sigilified.
442
446
  */
443
- declare function SigilifyAbstract<B extends ConstructorAbstract, L extends string>(Base: B, label: L, opts?: SigilOptions): ((abstract new (...args: any[]) => {
447
+ declare function SigilifyAbstract<L extends string>(Base: ConstructorAbstract, label: L, opts?: SigilOptions): (abstract new (...args: any[]) => {
448
+ [sigil]: {
449
+ Sigil: true;
450
+ } & { [K_1 in L]: true; } extends infer T ? { [K in keyof T]: T[K]; } : never;
444
451
  /**
445
452
  * Check whether `other` is (or inherits from) the instance represented by the
446
453
  * calling constructor.
@@ -453,7 +460,7 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
453
460
  * @param other - The object to test.
454
461
  * @returns A type guard asserting `other` is an instance of the constructor.
455
462
  */
456
- isOfType<T>(this: T, other: unknown): other is T;
463
+ isOfType<T_1>(this: T_1, other: unknown): other is T_1;
457
464
  /**
458
465
  * Check whether `other` is exactly the same instance represented by the
459
466
  * calling constructor.
@@ -463,7 +470,7 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
463
470
  * @param other - The object to test.
464
471
  * @returns A type guard asserting `other` is an instance of the constructor.
465
472
  */
466
- isExactType<T>(this: T, other: unknown): other is T;
473
+ isExactType<T_1>(this: T_1, other: unknown): other is T_1;
467
474
  /**
468
475
  * Returns the identity sigil label of this instance's constructor.
469
476
  *
@@ -485,24 +492,19 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
485
492
  /**
486
493
  * Returns a copy of the sigil type label lineage set for this instance's constructor.
487
494
  *
495
+ * @deprecated To minize API and bundle size, internally this method is 'new Set(this.SigilLabelLineage)' only. will be removed in v4
488
496
  * @returns readonly array of labels representing the type lineage.
489
497
  */
490
498
  getSigilLabelSet(): Readonly<Set<string>>;
491
- /**
492
- * Compile-time nominal brand that encodes the class sigil labels object.
493
- */
494
- readonly [sigil]: {
495
- Sigil: true;
496
- } & { [K_1 in L]: true; } extends infer T ? { [K in keyof T]: T[K]; } : never;
497
499
  }) & {
498
500
  /**
499
501
  * Class-level identity label constant for this sigil constructor.
500
502
  */
501
- get SigilLabel(): L;
503
+ get SigilLabel(): string;
502
504
  /**
503
505
  * Class-level human-readable label constant for this sigil constructor, last passed label in 'Sigil' chain by developer.
504
506
  */
505
- get SigilEffectiveLabel(): L;
507
+ get SigilEffectiveLabel(): string;
506
508
  /**
507
509
  * Linearized sigil type label chain for the current constructor.
508
510
  *
@@ -515,6 +517,7 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
515
517
  * Sigil type label set for the current constructor.
516
518
  * Useful for debugging.
517
519
  *
520
+ * @deprecated To minize API and bundle size, internally this method is 'new Set(this.SigilLabelLineage)' only. will be removed in v4
518
521
  * @returns A Readonly Set of labels that represent the type lineage.
519
522
  */
520
523
  get SigilLabelSet(): Readonly<Set<string>>;
@@ -541,6 +544,6 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
541
544
  * @returns A type guard asserting `other` is an instance of the constructor.
542
545
  */
543
546
  isExactType<T>(this: T, other: unknown): other is GetPrototype<T>;
544
- }) & B;
547
+ };
545
548
 
546
- export { DEFAULT_LABEL_REGEX, type ExtendSigil, type GetPrototype, type ISigil, type ISigilInstance, type ISigilStatic, RECOMMENDED_LABEL_REGEX, Sigil, SigilError, type SigilOf, type SigilOptions, Sigilify, SigilifyAbstract, WithSigil, getSigilLabels, isSigilCtor, isSigilInstance, sigil, updateSigilOptions, withSigil };
549
+ export { AttachSigil, DEFAULT_LABEL_REGEX, type ExtendSigil, type GetPrototype, type ISigil, type ISigilInstance, type ISigilStatic, RECOMMENDED_LABEL_REGEX, Sigil, SigilError, type SigilOf, type SigilOptions, Sigilify, SigilifyAbstract, WithSigil, attachSigil, getSigilLabels, isSigilCtor, isSigilInstance, sigil, updateSigilOptions, withSigil };