feat(is-relative-path): type definition for v2 (#42780)

- type definitions
- tests

https://github.com/mrjoelkemp/is-relative-path#usage

Thanks!
This commit is contained in:
Piotr Błażejewicz (Peter Blazejewicz)
2020-03-02 17:48:33 -08:00
committed by GitHub
parent 80b5c8a717
commit 60ff970f67
4 changed files with 38 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
// Type definitions for is-relative-path 2.0
// Project: https://github.com/mrjoelkemp/is-relative-path
// Definitions by: Piotr Błażejewicz (Peter Blazejewicz) <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Is relative path?
*/
declare function isRelative(path: string): boolean;
export = isRelative;
@@ -0,0 +1,3 @@
import isRelative = require('is-relative-path');
isRelative('.'); // $ExpectType boolean
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"is-relative-path-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }