Skip to content

Commit 91a6bfd

Browse files
committed
fix(synth-wasm-js): add type annotation for NodeFlags bitwise operations
1 parent 3f555d8 commit 91a6bfd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/synth-wasm-js/src/types.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,16 @@ export enum NodeKind {
8686
/**
8787
* Flags for AST nodes
8888
*/
89-
export const NodeFlags = {
89+
export const NodeFlags: {
90+
readonly CONST: number
91+
readonly LET: number
92+
readonly ASYNC: number
93+
readonly GENERATOR: number
94+
readonly COMPUTED: number
95+
readonly SHORTHAND: number
96+
readonly STATIC: number
97+
readonly EXPORT_DEFAULT: number
98+
} = {
9099
CONST: 1 << 0,
91100
LET: 1 << 1,
92101
ASYNC: 1 << 2,
@@ -95,7 +104,7 @@ export const NodeFlags = {
95104
SHORTHAND: 1 << 5,
96105
STATIC: 1 << 6,
97106
EXPORT_DEFAULT: 1 << 7,
98-
} as const
107+
}
99108

100109
/**
101110
* Compact AST node (16 bytes in binary format)

0 commit comments

Comments
 (0)