@vicin/sigil 3.3.0 → 4.0.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.ts CHANGED
@@ -1,117 +1,12 @@
1
1
  /** -----------------------------------------
2
- * Nominal identity symbol
2
+ * Public
3
3
  * ----------------------------------------- */
4
4
  /**
5
5
  * Symbol used for nominal typing
6
6
  */
7
7
  declare const sigil: unique symbol;
8
- /** -----------------------------------------
9
- * Class and instance
10
- * ----------------------------------------- */
11
- /**
12
- * Static-side interface describing methods and properties added to a class
13
- * constructor when it is sigilified.
14
- *
15
- * The properties and methods described here mirror the getters and static
16
- * predicates implemented by the `Sigilify` mixin.
17
- *
18
- * @template L - Narrow string literal type representing the label.
19
- * @template P - Optinal parent to extend its '[sigil]'.
20
- */
21
- interface ISigilStatic<L extends string = string> {
22
- /** Class-level label constant (identity). */
23
- readonly SigilLabel: L;
24
- /** Class-level label constant (human readable). */
25
- readonly SigilEffectiveLabel: L;
26
- /**
27
- * Copy of the linearized sigil type label chain for the current constructor.
28
- * Useful for debugging.
29
- */
30
- readonly SigilLabelLineage: readonly string[];
31
- /**
32
- * Copy of the sigil type label set for the current constructor.
33
- * Useful for debugging.
34
- */
35
- readonly SigilLabelSet: Readonly<Set<string>>;
36
- /**
37
- * Check whether `other` is (or inherits from) the instance represented by the
38
- * calling constructor.
39
- *
40
- * This replaces `instanceof` so that checks remain valid across bundles/realms
41
- * and when subclassing.
42
- *
43
- * @typeParam T - The specific sigil constructor (`this`).
44
- * @param this - The constructor performing the type check.
45
- * @param other - The object to test.
46
- * @returns A type guard asserting `other` is an instance of the constructor.
47
- */
48
- isOfType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
49
- /**
50
- * Check whether `other` is exactly the same instance represented by the
51
- * calling constructor.
52
- *
53
- * @typeParam T - The specific sigil constructor (`this`).
54
- * @param this - The constructor performing the type check.
55
- * @param other - The object to test.
56
- * @returns A type guard asserting `other` is an instance of the constructor.
57
- */
58
- isExactType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
59
- }
60
- /**
61
- * Instance-side interface describing properties present on sigil instances.
62
- * The methods mirror the instance helpers injected by the mixin.
63
- *
64
- * @template L - Narrow string literal type for the label returned by `getSigilLabel`.
65
- * @template P - Optinal parent to extend its '[sigil]'.
66
- */
67
- interface ISigilInstance<L extends string = string, P extends Function = never> {
68
- /** Compile-time nominal brand that encodes the class label `L` plus parent's sigil labels `SigilOf<P>`. */
69
- readonly [sigil]: Prettify<{
70
- Sigil: true;
71
- } & IfNever<SigilOf<P>, {}> & {
72
- [k in L]: true;
73
- }>;
74
- /** Returns identity sigil label of the class constructor. */
75
- getSigilLabel(): string;
76
- /** Returns human-readable sigil label of the class constructor. */
77
- getSigilEffectiveLabel(): string;
78
- /** Returns copy of sigil type label lineage of the class constructor. */
79
- getSigilLabelLineage(): readonly string[];
80
- /** Returns copy of sigil type label set of the class constructor. */
81
- getSigilLabelSet(): Readonly<Set<string>>;
82
- /**
83
- * Check whether `other` is (or inherits from) the instance represented by the
84
- * calling constructor.
85
- *
86
- * This replaces `instanceof` so that checks remain valid across bundles/realms
87
- * and when subclassing.
88
- *
89
- * @typeParam T - The specific sigil constructor (`this`).
90
- * @param this - The constructor performing the type check.
91
- * @param other - The object to test.
92
- * @returns A type guard asserting `other` is an instance of the constructor.
93
- */
94
- isOfType<T extends ISigilInstance>(this: T, other: unknown): other is T;
95
- /**
96
- * Check whether `other` is exactly the same instance represented by the
97
- * calling constructor.
98
- *
99
- * @typeParam T - The specific sigil constructor (`this`).
100
- * @param this - The constructor performing the type check.
101
- * @param other - The object to test.
102
- * @returns A type guard asserting `other` is an instance of the constructor.
103
- */
104
- isExactType<T extends ISigilInstance>(this: T, other: unknown): other is T;
105
- }
106
- /**
107
- * Combined constructor + static interface for a sigil class.
108
- *
109
- * @template L - Narrow string literal type for the label.
110
- * @template P - Optinal parent to extend its '[sigil]'.
111
- */
112
- type ISigil<L extends string = string, P extends Function = never> = ConstructorAbstract<ISigilInstance<L, P>> & ISigilStatic<L>;
113
8
  /** Update '[sigil]' field for nominal typing */
114
- type ExtendSigil<L extends string, P extends ISigilInstance> = Prettify<IfNever<SigilOf<P>, {}> & {
9
+ type ExtendSigil<L extends string, P extends Sigil> = Prettify<IfNever<SigilOf<P>, {}> & {
115
10
  [K in L]: true;
116
11
  }>;
117
12
  /**
@@ -123,8 +18,16 @@ type ExtendSigil<L extends string, P extends ISigilInstance> = Prettify<IfNever<
123
18
  type SigilOf<S> = S extends {
124
19
  readonly [sigil]: infer Sigil;
125
20
  } ? Sigil : never;
21
+ /**
22
+ * Helper type to get prototype of class
23
+ *
24
+ * @template T - Class constructor.
25
+ */
26
+ type GetPrototype<T> = T extends {
27
+ prototype: infer P;
28
+ } ? P : never;
126
29
  /** -----------------------------------------
127
- * Generic types
30
+ * Internal
128
31
  * ----------------------------------------- */
129
32
  /**
130
33
  * Generic type for class constructors used by the Sigil utilities.
@@ -152,14 +55,6 @@ type Prettify<T> = {
152
55
  } & {};
153
56
  /** Helper type to replace 'never' with another type */
154
57
  type IfNever<T, R = {}> = [T] extends [never] ? R : T;
155
- /**
156
- * Helper type to get prototype of class
157
- *
158
- * @template T - Class constructor.
159
- */
160
- type GetPrototype<T> = T extends {
161
- prototype: infer P;
162
- } ? P : never;
163
58
 
164
59
  /**
165
60
  * A minimal root Sigil class used by the library as a base identity.
@@ -169,24 +64,20 @@ type GetPrototype<T> = T extends {
169
64
  */
170
65
  declare const Sigil: {
171
66
  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;
174
- getSigilLabel(): string;
175
- getSigilEffectiveLabel(): string;
176
- getSigilLabelLineage(): readonly string[];
177
- getSigilLabelSet(): Readonly<Set<string>>;
67
+ isInstance<T>(this: T, other: any): other is T;
68
+ isExactInstance<T>(this: T, other: any): other is T;
69
+ get SigilLabel(): string;
70
+ get SigilLabelLineage(): readonly string[];
71
+ get hasOwnSigil(): boolean;
178
72
  readonly [sigil]: {
179
73
  Sigil: true;
180
74
  };
181
75
  };
182
- get SigilLabel(): "Sigil";
183
- get SigilEffectiveLabel(): "Sigil";
76
+ get SigilLabel(): string;
184
77
  get SigilLabelLineage(): readonly string[];
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 (): {};
78
+ get hasOwnSigil(): boolean;
79
+ isInstance<T>(this: T, other: any): other is GetPrototype<T>;
80
+ isExactInstance<T>(this: T, other: any): other is GetPrototype<T>;
190
81
  };
191
82
  type Sigil = InstanceType<typeof Sigil>;
192
83
  /**
@@ -194,28 +85,26 @@ type Sigil = InstanceType<typeof Sigil>;
194
85
  * to represent Sigil-specific errors.
195
86
  *
196
87
  * Use `SigilError` when you want an Error type that is identifiable via sigil
197
- * runtime checks (e.g. `SigilError.isOfType(someError)`).
88
+ * runtime checks (e.g. `SigilError.isInstance(someError)`).
198
89
  */
199
90
  declare const SigilError: {
200
91
  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;
203
- getSigilLabel(): string;
204
- getSigilEffectiveLabel(): string;
205
- getSigilLabelLineage(): readonly string[];
206
- getSigilLabelSet(): Readonly<Set<string>>;
207
- readonly [sigil]: {
92
+ [sigil]: {
208
93
  Sigil: true;
209
94
  SigilError: true;
210
95
  };
96
+ isInstance<T>(this: T, other: any): other is T;
97
+ isExactInstance<T>(this: T, other: any): other is T;
98
+ get SigilLabel(): string;
99
+ get SigilLabelLineage(): readonly string[];
100
+ get hasOwnSigil(): boolean;
211
101
  };
212
- get SigilLabel(): "SigilError";
213
- get SigilEffectiveLabel(): "SigilError";
102
+ get SigilLabel(): string;
214
103
  get SigilLabelLineage(): readonly string[];
215
- 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;
104
+ get hasOwnSigil(): boolean;
105
+ isInstance<T>(this: T, other: any): other is GetPrototype<T>;
106
+ isExactInstance<T>(this: T, other: any): other is GetPrototype<T>;
107
+ };
219
108
  type SigilError = InstanceType<typeof SigilError>;
220
109
 
221
110
  /** -----------------------------------------
@@ -237,18 +126,6 @@ interface SigilOptions {
237
126
  * Defaults to `null`.
238
127
  */
239
128
  labelValidation?: ((label: string) => boolean) | RegExp | null;
240
- /**
241
- * When enabled, non-decorated subclasses that would otherwise inherit an ancestor's label
242
- * will be assigned an autogenerated random label (so that explicit labels stay unique).
243
- */
244
- autofillLabels?: boolean;
245
- /**
246
- * Option for Hot module reload set-ups, reload of files can result in class redefinition which will throw
247
- * duplicate label error, setting this to 'true' will disabel this error.
248
- * However as it disables unique label check bugs can appear if the same label is passed to two different
249
- * classes so set this to 'true' only when needed and ensure uniqueness of passed labels.
250
- */
251
- skipLabelUniquenessCheck?: boolean;
252
129
  }
253
130
  /** -----------------------------------------
254
131
  * Update options
@@ -259,7 +136,7 @@ interface SigilOptions {
259
136
  *
260
137
  * @param opts - Partial options to merge into the global `OPTIONS` object.
261
138
  */
262
- declare const updateSigilOptions: (opts: SigilOptions) => void;
139
+ declare const updateSigilOptions: ({ labelValidation }?: SigilOptions) => void;
263
140
  /** -----------------------------------------
264
141
  * Label validation
265
142
  * ----------------------------------------- */
@@ -271,8 +148,6 @@ declare const updateSigilOptions: (opts: SigilOptions) => void;
271
148
  * It's advised to use this regex in 'SigilOptions.labelValidation'.
272
149
  */
273
150
  declare const RECOMMENDED_LABEL_REGEX: RegExp;
274
- /** @deprecated - Use 'RECOMMENDED_LABEL_REGEX' instead, will be removed in v4 */
275
- declare const DEFAULT_LABEL_REGEX: RegExp;
276
151
 
277
152
  /**
278
153
  * Class decorator factory that attaches sigil statics to a class constructor.
@@ -281,11 +156,10 @@ declare const DEFAULT_LABEL_REGEX: RegExp;
281
156
  * @param opts - Options object to override any global options if needed.
282
157
  * @returns A class decorator compatible with the ECMAScript decorator context.
283
158
  */
284
- declare function WithSigil(label: string, opts?: SigilOptions): (value: Function, context: any) => void;
285
-
159
+ declare function AttachSigil(label: string, opts?: SigilOptions): (target: Function, ctx: any) => void;
286
160
  /**
287
- * HOF (class inhancer) that attaches runtime sigil metadata to Sigil class.
288
- * Alternative to '@WithSigil' if you prefer HOFs.
161
+ * Function that attaches runtime sigil metadata to Sigil class.
162
+ * Alternative to '@AttachSigil' if you prefer normal functions.
289
163
  *
290
164
  * @typeParam S - Constructor type (should be an instance of sigil class).
291
165
  * @param Class - The constructor (class) to enhance.
@@ -293,18 +167,15 @@ declare function WithSigil(label: string, opts?: SigilOptions): (value: Function
293
167
  * @param opts - Options object to override any global options if needed.
294
168
  * @returns The same constructor value, with runtime metadata ensured.
295
169
  */
296
- declare function withSigil<S extends Function>(Class: S, label: string, opts?: SigilOptions): S;
170
+ declare function attachSigil<S extends Function>(Class: S, label: string, opts?: SigilOptions): S;
297
171
 
298
- /** -----------------------------------------
299
- * Inspection helpers
300
- * ----------------------------------------- */
301
172
  /**
302
173
  * Runtime predicate that checks whether the provided value is a sigil constructor.
303
174
  *
304
175
  * @param ctor - Constructor to test.
305
176
  * @returns `true` if `value` is a sigil constructor, otherwise `false`.
306
177
  */
307
- declare function isSigilCtor(ctor: unknown): ctor is ISigil;
178
+ declare function isSigilCtor(ctor: unknown): ctor is typeof Sigil;
308
179
  /**
309
180
  * Runtime predicate that checks whether the provided object is an instance
310
181
  * of a sigil class.
@@ -312,12 +183,7 @@ declare function isSigilCtor(ctor: unknown): ctor is ISigil;
312
183
  * @param inst - The instanca to test.
313
184
  * @returns `true` if `obj` is an instance produced by a sigil constructor.
314
185
  */
315
- declare function isSigilInstance(inst: unknown): inst is ISigilInstance;
316
- /**
317
- * Helper function to get labels registered by 'Sigil'
318
- * @returns Sigil labels registered
319
- */
320
- declare function getSigilLabels(): string[];
186
+ declare function isSigilInstance(inst: unknown): inst is Sigil;
321
187
 
322
188
  /**
323
189
  * Mixin factory that augments an existing class with Sigil runtime metadata and helpers.
@@ -328,8 +194,11 @@ declare function getSigilLabels(): string[];
328
194
  * @returns A new constructor that extends `Base` and includes Sigil statics/instance methods.
329
195
  * @throws Error if `Base` is already sigilified.
330
196
  */
331
- declare function Sigilify<B extends Constructor, L extends string>(Base: B, label: L, opts?: SigilOptions): {
197
+ declare function Sigilify<L extends string>(Base: Constructor, label: L, opts?: SigilOptions): {
332
198
  new (...args: any[]): {
199
+ [sigil]: {
200
+ Sigil: true;
201
+ } & { [K_1 in L]: true; } extends infer T ? { [K in keyof T]: T[K]; } : never;
333
202
  /**
334
203
  * Check whether `other` is (or inherits from) the instance represented by the
335
204
  * calling constructor.
@@ -342,7 +211,7 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
342
211
  * @param other - The object to test.
343
212
  * @returns A type guard asserting `other` is an instance of the constructor.
344
213
  */
345
- isOfType<T extends ISigilInstance>(this: T, other: unknown): other is T;
214
+ isInstance<T_1>(this: T_1, other: any): other is T_1;
346
215
  /**
347
216
  * Check whether `other` is exactly the same instance represented by the
348
217
  * calling constructor.
@@ -352,61 +221,38 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
352
221
  * @param other - The object to test.
353
222
  * @returns A type guard asserting `other` is an instance of the constructor.
354
223
  */
355
- isExactType<T extends ISigilInstance>(this: T, other: unknown): other is T;
224
+ isExactInstance<T_1>(this: T_1, other: any): other is T_1;
356
225
  /**
357
226
  * Returns the identity sigil label of this instance's constructor.
358
227
  *
359
228
  * @returns The label string if passed (e.g. '@scope/pkg.ClassName'), random label if not passed (e.g. '@Sigil-auto:ClassName:1:pnf11bgl').
360
229
  */
361
- getSigilLabel(): string;
230
+ get SigilLabel(): string;
362
231
  /**
363
- * Returns the human-readable sigil label of this instance's constructor.
232
+ * Copy of the sigil label lineage for this instance's constructor.
364
233
  *
365
- * @returns The last passed label string (e.g. '@scope/pkg.ClassName').
366
- */
367
- getSigilEffectiveLabel(): string;
368
- /**
369
- * Returns a copy of the sigil type label lineage for this instance's constructor.
370
- *
371
- * @returns readonly array of labels representing the type lineage.
372
- */
373
- getSigilLabelLineage(): readonly string[];
374
- /**
375
- * Returns a copy of the sigil type label lineage set for this instance's constructor.
234
+ * Useful for debugging and logging.
376
235
  *
377
- * @returns readonly array of labels representing the type lineage.
378
- */
379
- getSigilLabelSet(): Readonly<Set<string>>;
380
- /**
381
- * Compile-time nominal brand that encodes the class sigil labels object.
236
+ * @returns An array of sigil labels representing parent child labels.
382
237
  */
383
- readonly [sigil]: {
384
- Sigil: true;
385
- } & { [K_1 in L]: true; } extends infer T ? { [K in keyof T]: T[K]; } : never;
238
+ get SigilLabelLineage(): readonly string[];
239
+ /** Check if sigil label has been attached to this class */
240
+ get hasOwnSigil(): boolean;
386
241
  };
387
242
  /**
388
243
  * Class-level identity label constant for this sigil constructor.
389
244
  */
390
- get SigilLabel(): L;
391
- /**
392
- * Class-level human-readable label constant for this sigil constructor, last passed label in 'Sigil' chain by developer.
393
- */
394
- get SigilEffectiveLabel(): L;
245
+ get SigilLabel(): string;
395
246
  /**
396
- * Linearized sigil type label chain for the current constructor.
247
+ * Copy of the sigil label lineage for this instance's constructor.
397
248
  *
398
- * Useful for debugging and performing strict lineage comparisons.
249
+ * Useful for debugging and logging.
399
250
  *
400
- * @returns An array of labels representing parent → child type labels.
251
+ * @returns An array of sigil labels representing parent → child labels.
401
252
  */
402
253
  get SigilLabelLineage(): readonly string[];
403
- /**
404
- * Sigil type label set for the current constructor.
405
- * Useful for debugging.
406
- *
407
- * @returns A Readonly Set of labels that represent the type lineage.
408
- */
409
- get SigilLabelSet(): Readonly<Set<string>>;
254
+ /** Check if sigil label has been attached to this class */
255
+ get hasOwnSigil(): boolean;
410
256
  /**
411
257
  * Check whether `other` is (or inherits from) the instance represented by the
412
258
  * calling constructor.
@@ -419,7 +265,7 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
419
265
  * @param other - The object to test.
420
266
  * @returns A type guard asserting `other` is an instance of the constructor.
421
267
  */
422
- isOfType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
268
+ isInstance<T>(this: T, other: any): other is GetPrototype<T>;
423
269
  /**
424
270
  * Check whether `other` is exactly the same instance represented by the
425
271
  * calling constructor.
@@ -429,8 +275,8 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
429
275
  * @param other - The object to test.
430
276
  * @returns A type guard asserting `other` is an instance of the constructor.
431
277
  */
432
- isExactType<T extends ISigilStatic>(this: T, other: unknown): other is GetPrototype<T>;
433
- } & B;
278
+ isExactInstance<T>(this: T, other: any): other is GetPrototype<T>;
279
+ };
434
280
  /**
435
281
  * Mixin factory that augments an existing class with Sigil runtime metadata and helpers. Accept and return 'abstract' class.
436
282
  *
@@ -440,7 +286,10 @@ declare function Sigilify<B extends Constructor, L extends string>(Base: B, labe
440
286
  * @returns A new abstract constructor that extends `Base` and includes Sigil statics/instance methods.
441
287
  * @throws Error if `Base` is already sigilified.
442
288
  */
443
- declare function SigilifyAbstract<B extends ConstructorAbstract, L extends string>(Base: B, label: L, opts?: SigilOptions): ((abstract new (...args: any[]) => {
289
+ declare function SigilifyAbstract<L extends string>(Base: ConstructorAbstract, label: L, opts?: SigilOptions): (abstract new (...args: any[]) => {
290
+ [sigil]: {
291
+ Sigil: true;
292
+ } & { [K_1 in L]: true; } extends infer T ? { [K in keyof T]: T[K]; } : never;
444
293
  /**
445
294
  * Check whether `other` is (or inherits from) the instance represented by the
446
295
  * calling constructor.
@@ -453,7 +302,7 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
453
302
  * @param other - The object to test.
454
303
  * @returns A type guard asserting `other` is an instance of the constructor.
455
304
  */
456
- isOfType<T>(this: T, other: unknown): other is T;
305
+ isInstance<T_1>(this: T_1, other: any): other is T_1;
457
306
  /**
458
307
  * Check whether `other` is exactly the same instance represented by the
459
308
  * calling constructor.
@@ -463,61 +312,38 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
463
312
  * @param other - The object to test.
464
313
  * @returns A type guard asserting `other` is an instance of the constructor.
465
314
  */
466
- isExactType<T>(this: T, other: unknown): other is T;
315
+ isExactInstance<T_1>(this: T_1, other: any): other is T_1;
467
316
  /**
468
317
  * Returns the identity sigil label of this instance's constructor.
469
318
  *
470
319
  * @returns The label string if passed (e.g. '@scope/pkg.ClassName'), random label if not passed (e.g. '@Sigil-auto:ClassName:1:pnf11bgl').
471
320
  */
472
- getSigilLabel(): string;
321
+ get SigilLabel(): string;
473
322
  /**
474
- * Returns the human-readable sigil label of this instance's constructor.
323
+ * Copy of the sigil label lineage for this instance's constructor.
475
324
  *
476
- * @returns The last passed label string (e.g. '@scope/pkg.ClassName').
477
- */
478
- getSigilEffectiveLabel(): string;
479
- /**
480
- * Returns a copy of the sigil type label lineage for this instance's constructor.
325
+ * Useful for debugging and logging.
481
326
  *
482
- * @returns readonly array of labels representing the type lineage.
327
+ * @returns An array of sigil labels representing parent child labels.
483
328
  */
484
- getSigilLabelLineage(): readonly string[];
485
- /**
486
- * Returns a copy of the sigil type label lineage set for this instance's constructor.
487
- *
488
- * @returns readonly array of labels representing the type lineage.
489
- */
490
- 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;
329
+ get SigilLabelLineage(): readonly string[];
330
+ /** Check if sigil label has been attached to this class */
331
+ get hasOwnSigil(): boolean;
497
332
  }) & {
498
333
  /**
499
334
  * Class-level identity label constant for this sigil constructor.
500
335
  */
501
- get SigilLabel(): L;
336
+ get SigilLabel(): string;
502
337
  /**
503
- * Class-level human-readable label constant for this sigil constructor, last passed label in 'Sigil' chain by developer.
504
- */
505
- get SigilEffectiveLabel(): L;
506
- /**
507
- * Linearized sigil type label chain for the current constructor.
338
+ * Copy of the sigil label lineage for this instance's constructor.
508
339
  *
509
- * Useful for debugging and performing strict lineage comparisons.
340
+ * Useful for debugging and logging.
510
341
  *
511
- * @returns An array of labels representing parent → child type labels.
342
+ * @returns An array of sigil labels representing parent → child labels.
512
343
  */
513
344
  get SigilLabelLineage(): readonly string[];
514
- /**
515
- * Sigil type label set for the current constructor.
516
- * Useful for debugging.
517
- *
518
- * @returns A Readonly Set of labels that represent the type lineage.
519
- */
520
- get SigilLabelSet(): Readonly<Set<string>>;
345
+ /** Check if sigil label has been attached to this class */
346
+ get hasOwnSigil(): boolean;
521
347
  /**
522
348
  * Check whether `other` is (or inherits from) the instance represented by the
523
349
  * calling constructor.
@@ -530,7 +356,7 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
530
356
  * @param other - The object to test.
531
357
  * @returns A type guard asserting `other` is an instance of the constructor.
532
358
  */
533
- isOfType<T>(this: T, other: unknown): other is GetPrototype<T>;
359
+ isInstance<T>(this: T, other: any): other is GetPrototype<T>;
534
360
  /**
535
361
  * Check whether `other` is exactly the same instance represented by the
536
362
  * calling constructor.
@@ -540,7 +366,9 @@ declare function SigilifyAbstract<B extends ConstructorAbstract, L extends strin
540
366
  * @param other - The object to test.
541
367
  * @returns A type guard asserting `other` is an instance of the constructor.
542
368
  */
543
- isExactType<T>(this: T, other: unknown): other is GetPrototype<T>;
544
- }) & B;
369
+ isExactInstance<T>(this: T, other: any): other is GetPrototype<T>;
370
+ };
371
+
372
+ declare function hasOwnSigil(ctor: Function): boolean;
545
373
 
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 };
374
+ export { AttachSigil, type ExtendSigil, type GetPrototype, RECOMMENDED_LABEL_REGEX, Sigil, SigilError, type SigilOf, type SigilOptions, Sigilify, SigilifyAbstract, attachSigil, hasOwnSigil, isSigilCtor, isSigilInstance, sigil, updateSigilOptions };