Skip to content

Commit dcbc597

Browse files
author
Jerry Green
committed
Generate .d.ts without namespace
1 parent d4e7b9d commit dcbc597

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

NOTICE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ under the licensing terms detailed in LICENSE:
3333
* Piotr Oleś <[email protected]>
3434
* Saúl Cabrera <[email protected]>
3535
* Chance Snow <[email protected]>
36+
* Jerry Green <[email protected]>
3637

3738
Portions of this software are derived from third-party works licensed under
3839
the following terms:
@@ -58,6 +59,6 @@ the following terms:
5859
The 3-Clause BSD License (https://opensource.org/licenses/BSD-3-Clause)
5960

6061
* Arm Optimized Routines: https://github.com/ARM-software/optimized-routines
61-
62+
6263
Copyright (c) Arm Limited
6364
The MIT License (https://opensource.org/licenses/MIT)

src/definitions.ts

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -604,33 +604,28 @@ export class TSDBuilder extends ExportsWalker {
604604
build(): string {
605605
var sb = this.sb;
606606
var isWasm64 = this.program.options.isWasm64;
607-
sb.push("declare module ASModule {\n");
608-
sb.push(" type i8 = number;\n");
609-
sb.push(" type i16 = number;\n");
610-
sb.push(" type i32 = number;\n");
611-
sb.push(" type i64 = bigint;\n");
607+
sb.push("type i8 = number;\n");
608+
sb.push("type i16 = number;\n");
609+
sb.push("type i32 = number;\n");
610+
sb.push("type i64 = bigint;\n");
612611
if (isWasm64) {
613-
sb.push(" type isize = bigint;\n");
612+
sb.push("type isize = bigint;\n");
614613
} else {
615-
sb.push(" type isize = number;\n");
614+
sb.push("type isize = number;\n");
616615
}
617-
sb.push(" type u8 = number;\n");
618-
sb.push(" type u16 = number;\n");
619-
sb.push(" type u32 = number;\n");
620-
sb.push(" type u64 = bigint;\n");
616+
sb.push("type u8 = number;\n");
617+
sb.push("type u16 = number;\n");
618+
sb.push("type u32 = number;\n");
619+
sb.push("type u64 = bigint;\n");
621620
if (isWasm64) {
622-
sb.push(" type usize = bigint;\n");
621+
sb.push("type usize = bigint;\n");
623622
} else {
624-
sb.push(" type usize = number;\n");
623+
sb.push("type usize = number;\n");
625624
}
626-
sb.push(" type f32 = number;\n");
627-
sb.push(" type f64 = number;\n");
628-
sb.push(" type bool = boolean | number;\n");
629-
++this.indentLevel;
625+
sb.push("type f32 = number;\n");
626+
sb.push("type f64 = number;\n");
627+
sb.push("type bool = boolean | number;\n");
630628
this.walk();
631-
--this.indentLevel;
632-
sb.push("}\n");
633-
sb.push("export default ASModule;\n");
634629
return this.sb.join("");
635630
}
636631
}

0 commit comments

Comments
 (0)