Skip to content

Commit 3b4fad5

Browse files
committed
Feature: StaticScript defintion
1 parent b3f4b97 commit 3b4fad5

5 files changed

Lines changed: 9 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.1.0",
44
"description": "",
55
"main": "index.js",
6+
"typings": "staticscript.d.ts",
67
"scripts": {
78
"build": "tsc"
89
},

packages/runtime/lib.runtime.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
declare function number2string(value: number): string;

src/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {initializeLLVM, generateModuleFromProgram} from './backend/llvm';
77

88
const options = {
99
lib: [
10-
path.join(__dirname, '..', 'runtime', 'lib.runtime.d.ts'),
11-
path.join(__dirname, '..', 'language.d.ts')
10+
path.join(__dirname, '..', 'packages', 'runtime', 'lib.runtime.d.ts'),
11+
path.join(__dirname, '..', 'staticscript.d.ts')
1212
],
1313
types: []
1414
};

language.d.ts renamed to staticscript.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ interface String {}
1515

1616
interface Array<T = any> {}
1717

18+
declare function puts(str: string): void;
19+
1820
declare type int8 = {};
1921
declare type int16 = {};
2022
declare type int32 = {};

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"sourceMap": true
88
},
99
"exclude": [
10-
"sandbox"
10+
"sandbox",
11+
"packages"
1112
]
1213
}

0 commit comments

Comments
 (0)