@tsonic/js-globals 0.3.4 → 0.4.1

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.
Files changed (2) hide show
  1. package/index.d.ts +8 -6
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -10,10 +10,10 @@
10
10
  * This enables JS-style programming while compiling to C# with Tsonic.JSRuntime
11
11
  *
12
12
  * Index-space values (length, indexOf, etc.) use `int` type alias from
13
- * @tsonic/types to enable numeric proof validation for array indexing.
13
+ * @tsonic/core to enable numeric proof validation for array indexing.
14
14
  */
15
15
 
16
- import { int } from "@tsonic/types";
16
+ import { int, long } from "@tsonic/core/types.js";
17
17
 
18
18
  declare global {
19
19
  /**
@@ -332,7 +332,7 @@ declare global {
332
332
  isNaN(value: unknown): value is number;
333
333
  isSafeInteger(value: unknown): value is number;
334
334
  parseFloat(string: string): number;
335
- parseInt(string: string, radix?: number): number;
335
+ parseInt(string: string, radix?: number): long | undefined;
336
336
  }
337
337
 
338
338
  const Number: NumberConstructor;
@@ -431,19 +431,21 @@ declare global {
431
431
  asin(x: number): number;
432
432
  atan(x: number): number;
433
433
  atan2(y: number, x: number): number;
434
- ceil(x: number): number;
434
+ ceil(x: number): long;
435
435
  cos(x: number): number;
436
436
  exp(x: number): number;
437
- floor(x: number): number;
437
+ floor(x: number): long;
438
438
  log(x: number): number;
439
439
  max(...values: number[]): number;
440
440
  min(...values: number[]): number;
441
441
  pow(x: number, y: number): number;
442
442
  random(): number;
443
- round(x: number): number;
443
+ round(x: number): long;
444
+ sign(x: number): int;
444
445
  sin(x: number): number;
445
446
  sqrt(x: number): number;
446
447
  tan(x: number): number;
448
+ trunc(x: number): long;
447
449
  }
448
450
 
449
451
  const Math: Math;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsonic/js-globals",
3
- "version": "0.3.4",
3
+ "version": "0.4.1",
4
4
  "description": "Global type definitions for Tsonic JS mode (noLib: true, JavaScript semantics)",
5
5
  "main": "index.d.ts",
6
6
  "types": "index.d.ts",
@@ -12,7 +12,7 @@
12
12
  "typecheck": "tsc --noEmit"
13
13
  },
14
14
  "dependencies": {
15
- "@tsonic/types": "^0.3.1"
15
+ "@tsonic/core": "^0.1.0"
16
16
  },
17
17
  "devDependencies": {
18
18
  "typescript": "^5.0.0"