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-03 02:48:33 +01:00 committed by GitHub
parent 80b5c8a717
commit 60ff970f67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 0 deletions

11
types/is-relative-path/index.d.ts vendored Normal file
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;

View File

@ -0,0 +1,3 @@
import isRelative = require('is-relative-path');
isRelative('.'); // $ExpectType boolean

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"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }