tjs-lang 0.6.43 → 0.6.45
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/CLAUDE.md +51 -14
- package/demo/docs.json +2 -2
- package/dist/index.js +80 -78
- package/dist/index.js.map +6 -6
- package/dist/src/lang/runtime.d.ts +14 -0
- package/dist/tjs-full.js +80 -78
- package/dist/tjs-full.js.map +6 -6
- package/package.json +1 -1
- package/src/cli/tjs.ts +1 -1
- package/src/lang/emitters/dts.ts +14 -1
- package/src/lang/emitters/from-ts.ts +4 -2
- package/src/lang/emitters/js.ts +10 -2
- package/src/lang/runtime.ts +39 -0
|
@@ -197,6 +197,18 @@ export declare function IsNot(a: unknown, b: unknown): boolean;
|
|
|
197
197
|
* Usage: `typeof x` with TjsEquals transforms to `TypeOf(x)`
|
|
198
198
|
*/
|
|
199
199
|
export declare function TypeOf(value: unknown): string;
|
|
200
|
+
/**
|
|
201
|
+
* Check if a number is bounded (finite and not NaN).
|
|
202
|
+
* The question you're actually asking when you reach for isNaN or isFinite.
|
|
203
|
+
*
|
|
204
|
+
* IsBounded(42) → true
|
|
205
|
+
* IsBounded(3.14) → true
|
|
206
|
+
* IsBounded(NaN) → false
|
|
207
|
+
* IsBounded(Infinity) → false
|
|
208
|
+
* IsBounded(-Infinity) → false
|
|
209
|
+
* IsBounded('hello') → false
|
|
210
|
+
*/
|
|
211
|
+
export declare function IsBounded(value: unknown): boolean;
|
|
200
212
|
export declare function Eq(a: unknown, b: unknown): boolean;
|
|
201
213
|
/**
|
|
202
214
|
* Honest inequality — what != should have been.
|
|
@@ -385,6 +397,7 @@ export declare function createRuntime(): {
|
|
|
385
397
|
Eq: typeof Eq;
|
|
386
398
|
NotEq: typeof NotEq;
|
|
387
399
|
TypeOf: typeof TypeOf;
|
|
400
|
+
IsBounded: typeof IsBounded;
|
|
388
401
|
tjsEquals: symbol;
|
|
389
402
|
registerExtension: (typeName: string, methodName: string, fn: (...args: any[]) => any) => void;
|
|
390
403
|
resolveExtension: (value: unknown, methodName: string) => ((...args: any[]) => any) | undefined;
|
|
@@ -452,6 +465,7 @@ export declare const runtime: {
|
|
|
452
465
|
Eq: typeof Eq;
|
|
453
466
|
NotEq: typeof NotEq;
|
|
454
467
|
TypeOf: typeof TypeOf;
|
|
468
|
+
IsBounded: typeof IsBounded;
|
|
455
469
|
};
|
|
456
470
|
/**
|
|
457
471
|
* Install runtime globally (idempotent, version-checked)
|