Skip to content

Commit e4a17c2

Browse files
Switching to typescript
1 parent 8c33139 commit e4a17c2

10 files changed

Lines changed: 31 additions & 19 deletions

File tree

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"sourceMaps": true,
2+
"sourceMaps": "inline",
33
"presets": [
44
"@babel/preset-typescript",
55
"minify"

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
/coverage/
1111
/.nyc_output/
1212
browser.js
13-
browser.js.map
1413
main.js
15-
main.js.map
1614

1715
# Log files
1816
*.log

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "types"]
2-
path = types
3-
url = https://github.com/unctionjs/_types.git
2+
path = types
3+
url = https://github.com/unctionjs/_types.git
File renamed without changes.

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
"prepublishOnly": "npm run build",
3030
"test": "NODE_ENV=test tap --100 './test.js'",
3131
"build": "npm run build:browser && npm run build:main",
32-
"build:main": "babel --env-name main --out-file './main.js' './index.js'",
33-
"build:browser": "babel --env-name browser --out-file './browser.js' './index.js'",
34-
"lint": "eslint './index.js'",
35-
"ci": "npm run test"
32+
"build:main": "babel --env-name main --out-file './main.js' './index.ts'",
33+
"build:browser": "babel --env-name browser --out-file './browser.js' './index.ts'",
34+
"lint": "eslint './index.ts'",
35+
"typecheck": "tsc --noEmit",
36+
"ci": "npm run typecheck && npm run lint && npm run test"
3637
},
3738
"devDependencies": {
3839
"@babel/cli": "7.4.4",
@@ -55,9 +56,11 @@
5556
"eslint-plugin-promise": "4.1.1",
5657
"jest": "23.0.0",
5758
"nyc": "13.3.0",
58-
"tap": "12.6.1"
59+
"tap": "12.6.1",
60+
"typescript": "3.5.1"
61+
},
62+
"dependencies": {
5963
},
60-
"dependencies": {},
6164
"files": [
6265
"index.js",
6366
"main.js",

test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-magic-numbers */
22
import {test} from "tap";
33

4-
import fromIteratorToArray from "./index";
4+
import fromIteratorToArray from "./";
55

66
test(({same, end}) => {
77
same(

tsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"compilerOptions": {
3+
"noImplicitAny": true,
4+
"module": "es6",
5+
"target": "es6",
6+
"allowSyntheticDefaultImports": true,
7+
"allowJs": false,
8+
"moduleResolution": "node"
9+
}
10+
}

types.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./types/index";

0 commit comments

Comments
 (0)