mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[chmodr] add typings
This commit is contained in:
parent
cc1e320ed6
commit
09b8a3e046
14
types/chmodr/chmodr-tests.ts
Normal file
14
types/chmodr/chmodr-tests.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import chmodr = require('chmodr');
|
||||
import { URL } from 'url';
|
||||
|
||||
chmodr('', '', err => {
|
||||
err; // $ExpectType ErrnoException
|
||||
});
|
||||
chmodr(new Buffer(''), '', () => {});
|
||||
chmodr(new URL(''), '', () => {});
|
||||
chmodr(new URL(''), 1, () => {});
|
||||
|
||||
chmodr.sync('', '');
|
||||
chmodr.sync(new Buffer(''), '');
|
||||
chmodr.sync(new URL(''), '');
|
||||
chmodr.sync(new URL(''), 1);
|
||||
17
types/chmodr/index.d.ts
vendored
Normal file
17
types/chmodr/index.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
// Type definitions for chmodr 1.0
|
||||
// Project: https://github.com/isaacs/chmodr#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
import { URL } from 'url';
|
||||
|
||||
export = chmodr;
|
||||
|
||||
declare function chmodr(path: chmodr.PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
|
||||
declare namespace chmodr {
|
||||
function sync(path: PathLike, mode: string | number): void;
|
||||
|
||||
type PathLike = string | Buffer | URL;
|
||||
}
|
||||
22
types/chmodr/tsconfig.json
Normal file
22
types/chmodr/tsconfig.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"chmodr-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/chmodr/tslint.json
Normal file
1
types/chmodr/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user