Skip to content

Commit bd6515d

Browse files
committed
[cached-path-relative] Add [email protected] definition
1 parent 28be0fc commit bd6515d

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import cachedPathRelative = require("cached-path-relative");
2+
3+
function browserifyTest() {
4+
const file = "file.txt";
5+
const m1: string = cachedPathRelative("./", file).replace(/\\/g, '/');
6+
return m1;
7+
}

types/cached-path-relative/index.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Type definitions for cached-path-relative 1.0
2+
// Project: https://github.com/ashaffer/cached-path-relative
3+
// Definitions by: TeamworkGuy2 <https://github.com/TeamworkGuy2>
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+
6+
declare function cachedPathRelative(from: string, to: string): string;
7+
8+
export = cachedPathRelative;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"lib": [
5+
"es6"
6+
],
7+
"noImplicitAny": true,
8+
"noImplicitThis": true,
9+
"strictNullChecks": true,
10+
"strictFunctionTypes": true,
11+
"baseUrl": "../",
12+
"typeRoots": [
13+
"../"
14+
],
15+
"types": [],
16+
"noEmit": true,
17+
"forceConsistentCasingInFileNames": true
18+
},
19+
"files": [
20+
"index.d.ts",
21+
"cached-path-relative-tests.ts"
22+
]
23+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "extends": "dtslint/dt.json" }

0 commit comments

Comments
 (0)