Skip to content

Commit a27cc54

Browse files
authored
Fixed compiler constant hint in typescript typedefs (AssemblyScript#1317)
1 parent 94ba6af commit a27cc54

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

NOTICE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ under the licensing terms detailed in LICENSE:
2222
* Duncan Uszkay <duncan.uszkay@shopify.com>
2323
* Surma <surma@surma.dev>
2424
* Julien Letellier <letellier.julien@gmail.com>
25+
* Guido Zuidhof <me@guido.io>
2526

2627
Portions of this software are derived from third-party works licensed under
2728
the following terms:

std/assembly/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ declare type anyref = object;
4040

4141
// Compiler hints
4242

43-
/** Compiler target. 0 = JS, 1 = WASM32, 2 = WASM64. */
43+
/** Compiler target. 0 = WASM32, 1 = WASM64, 2 = JS. */
4444
declare const ASC_TARGET: i32;
4545
/** Provided noAssert option. */
4646
declare const ASC_NO_ASSERT: bool;

std/assembly/shared/target.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
/** Compilation target. */
44
export enum Target {
55
/** WebAssembly with 32-bit pointers. */
6-
WASM32,
6+
WASM32 = 0,
77
/** WebAssembly with 64-bit pointers. Experimental and not supported by any runtime yet. */
8-
WASM64,
8+
WASM64 = 1,
99
/** Portable. */
10-
JS
10+
JS = 2
1111
}

std/portable/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ declare type valueof<T extends unknown[]> = T[0];
3333

3434
// Compiler hints
3535

36-
/** Compiler target. 0 = JS, 1 = WASM32, 2 = WASM64. */
36+
/** Compiler target. 0 = WASM32, 1 = WASM64, 2 = JS. */
3737
declare const ASC_TARGET: i32;
3838
/** Provided noAssert option. */
3939
declare const ASC_NO_ASSERT: bool;

0 commit comments

Comments
 (0)