Skip to content

Commit

Permalink
Reconfigure TypeScript compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
KiChjang committed Jan 10, 2020
1 parent 36c4a01 commit ee44225
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ node_modules
package-lock.json

# TypeScript
/build
/build
**/*.d.ts
**/*.js
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "A few useful functions for signing ethereum data",
"main": "index.js",
"scripts": {
"build": "tsc -d",
"test": "npm run build && ts-node test/index.ts"
"build": "tsc --project .",
"test": "npm run build && node test/index.js"
},
"repository": {
"type": "git",
Expand All @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/MetaMask/eth-sig-util#readme",
"dependencies": {
"@types/node": "^13.1.2",
"@types/node": "^10",
"buffer": "^5.2.1",
"elliptic": "^6.4.0",
"ethereumjs-abi": "0.6.5",
Expand All @@ -32,7 +32,6 @@
},
"devDependencies": {
"tape": "^4.9.1",
"ts-node": "^8.5.4",
"typescript": "3.4.3"
"typescript": "3.7.4"
}
}
4 changes: 2 additions & 2 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ test('signedTypeData with V3 string', (t) => {
{ name: 'contents', type: 'string' }
],
},
primaryType: 'Mail' as 'Mail',
primaryType: 'Mail' as const,
domain: {
name: 'Ether Mail',
version: '1',
Expand Down Expand Up @@ -581,7 +581,7 @@ test('signedTypeData_v4', (t) => {
chainId: 1,
verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
},
primaryType: 'Mail' as 'Mail',
primaryType: 'Mail' as const,
message: {
from: {
name: 'Cow',
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"compilerOptions": {
"outDir": "./build",
"declaration": true,
"target": "es5"
},
"include": [
"./test/**/*",
"./index.ts",
"./utils/**/*"
]
Expand Down

0 comments on commit ee44225

Please sign in to comment.