Add typescript

This commit is contained in:
nolash 2020-11-14 00:17:28 +01:00
parent 5336542d04
commit 288ae2148c
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
4 changed files with 30 additions and 1 deletions

5
js/package-lock.json generated
View File

@ -2204,6 +2204,11 @@
"is-typedarray": "^1.0.0"
}
},
"typescript": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.5.tgz",
"integrity": "sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ=="
},
"ultron": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",

View File

@ -4,11 +4,13 @@
"description": "Accounts index evm contract tooling with permissioned writes",
"main": "dist/index.js",
"dependencies": {
"typescript": "^4.0.5",
"web3": "^1.3.0"
},
"devDependencies": {},
"scripts": {
"test": "python tests/test_app.js"
"build": "tsc -d --outDir dist/",
"prepare": "npm run build"
},
"keywords": [
"ethereum"

1
js/src/index.ts Normal file
View File

@ -0,0 +1 @@
export { AccountRegistry } from './registry';

21
js/tsconfig.json Normal file
View File

@ -0,0 +1,21 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist",
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"lib": ["es2016", "dom", "es5"],
"esModuleInterop": true,
"resolveJsonModule": true
},
"exclude": [
"node_modules",
"dist",
"scripts",
"tests"
],
"include": [
"src/*"
]
}