Skip to content

Commit 9c2420b

Browse files
authored
Fix missing shared types in assemblyscript.d.ts (AssemblyScript#786)
1 parent 12aed07 commit 9c2420b

File tree

5 files changed

+29
-2
lines changed

5 files changed

+29
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"scripts": {
4343
"build": "npm run build:bundle && npm run build:dts",
4444
"build:bundle": "webpack --mode production --display-modules",
45-
"build:dts": "node scripts/build-dts",
45+
"build:dts": "node scripts/build-dts && tsc --noEmit tests/dts/index",
4646
"clean": "node scripts/clean",
4747
"check": "npm run check:config && npm run check:compiler",
4848
"check:config": "tsc --noEmit -p src --diagnostics --listFiles",

scripts/build-dts.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,3 +448,14 @@ module.exports.default({
448448
sendMessage: console.log,
449449
stdout: stdout
450450
});
451+
452+
stdout.write("\n");
453+
454+
module.exports.default({
455+
project: path.resolve(__dirname, "..", "std/assembly/shared"),
456+
prefix: "assemblyscript/std/assembly/shared",
457+
exclude: [],
458+
verbose: true,
459+
sendMessage: console.log,
460+
stdout: stdout
461+
});

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,4 @@ export * from "./program";
208208
export * from "./resolver";
209209
export * from "./tokenizer";
210210
export * from "./types";
211-
export * from "./util";
211+
export * from "./util/index";

std/assembly/shared/tsconfig.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "../../portable.json",
3+
"compilerOptions": {
4+
"outDir": "../../../out",
5+
"allowJs": false,
6+
"sourceMap": true
7+
},
8+
"include": [
9+
"./**/*.ts"
10+
]
11+
}

tests/dts/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// used to check dist/assemblyscript.d.ts
2+
import * as as from "../..";
3+
4+
var parser: as.Parser = as.parseFile("", "empty");
5+
parser.finish();

0 commit comments

Comments
 (0)