Skip to content

Commit 159351b

Browse files
committed
TS 2.0ify definition, update tests/dependencies
1 parent e91cb45 commit 159351b

File tree

10 files changed

+96
-5
lines changed

10 files changed

+96
-5
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_size = 2
7+
indent_style = space
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
typings/
2+
node_modules/
3+
bundle.d.ts

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
sudo: false
2+
language: node_js
3+
4+
notifications:
5+
email:
6+
on_success: never
7+
on_failure: change
8+
9+
script:
10+
- npm run lint
11+
- npm run bundle
12+
- npm rm tslint
13+
- npm install $TYPESCRIPT --force
14+
- npm run exec
15+
16+
env:
17+
- TYPESCRIPT=typescript@latest
18+
- TYPESCRIPT=typescript@next
19+
20+
node_js:
21+
- "stable"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Typed Source Map Support
22

3-
The type definition for [source-map-support](https://github.com/evanw/node-source-map-support).
3+
The type definition for [`source-map-support`](https://github.com/evanw/node-source-map-support).
44

55
## License
66

package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "@types/source-map-support",
3+
"version": "0.4.3",
4+
"description": "Types for https://github.com/evanw/node-source-map-support",
5+
"typings": "source-map-support.d.ts",
6+
"scripts": {
7+
"lint": "tslint \"**/*.ts\" -e \"node_modules/**\" -e \"typings/**\" -e bundle.d.ts",
8+
"bundle": "typings bundle -o bundle.d.ts",
9+
"exec": "ts-node test.ts",
10+
"test": "npm run lint && npm run bundle && npm run exec",
11+
"prepublish": "typings install",
12+
"postpublish": "greenkeeper-postpublish"
13+
},
14+
"repository": {
15+
"type": "git",
16+
"url": "git+https://github.com/types/npm-source-map-support.git"
17+
},
18+
"author": {
19+
"name": "Blake Embrey",
20+
"email": "[email protected]",
21+
"url": "http://blakeembrey.me"
22+
},
23+
"license": "MIT",
24+
"bugs": {
25+
"url": "https://github.com/types/npm-source-map-support/issues"
26+
},
27+
"homepage": "https://github.com/types/npm-source-map-support#readme",
28+
"devDependencies": {
29+
"greenkeeper-postpublish": "^1.0.1",
30+
"source-map-support": "~0.4.3",
31+
"ts-node": "^1.3.0",
32+
"tslint": "^3.15.1",
33+
"tslint-config-typings": "^0.2.4",
34+
"typescript": "^2.0.3",
35+
"typings": "^1.4.0"
36+
}
37+
}

source-map-support.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export interface Options {
1818
environment?: 'node' | 'browser' | 'auto';
1919
handleUncaughtExceptions?: boolean;
2020
emptyCacheBetweenOperations?: boolean;
21-
retrieveFile?: (path: string) => string;
22-
retrieveSourceMap?: (source: string) => UrlAndMap;
21+
retrieveFile?: (path: string) => string | null | undefined;
22+
retrieveSourceMap?: (source: string) => UrlAndMap | null | undefined;
2323
}
2424

2525
export interface Position {

test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference path="./bundle.d.ts" />
2+
3+
import sourceMapSupport = require('source-map-support');
4+
5+
sourceMapSupport.install();

tsconfig.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"lib": ["es2015"],
5+
"module": "commonjs",
6+
"noImplicitAny": true,
7+
"noImplicitThis": true,
8+
"noImplicitReturns": true,
9+
"strictNullChecks": true
10+
}
11+
}

tslint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "tslint-config-typings"
3+
}

typings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "source-map-support",
3+
"version": "0.4.3",
34
"main": "source-map-support.d.ts",
4-
"ambientDependencies": {
5-
"node": "https://raw.githubusercontent.com/borisyankov/DefinitelyTyped/master/node/node.d.ts"
5+
"globalDevDependencies": {
6+
"node": "registry:env/node#6.0.0+20160918225031"
67
}
78
}

0 commit comments

Comments
 (0)