mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[git-add-remote] Add types
This commit is contained in:
parent
682ebb5fcd
commit
079a53d99e
11
types/git-add-remote/git-add-remote-tests.ts
Normal file
11
types/git-add-remote/git-add-remote-tests.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import addRemotePrepare = require('git-add-remote');
|
||||
|
||||
const addRemote = addRemotePrepare('foo/bar');
|
||||
|
||||
addRemote('foo', 'https://foo.git', (err, stdout, stderr) => {
|
||||
err; // $ExpectType ExecException | null
|
||||
stdout; // $ExpectType string
|
||||
stderr; // $ExpectType string
|
||||
});
|
||||
|
||||
addRemote.sync('foo', 'https://foo.git');
|
||||
24
types/git-add-remote/index.d.ts
vendored
Normal file
24
types/git-add-remote/index.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
// Type definitions for git-add-remote 1.0
|
||||
// Project: https://github.com/jonschlinkert/git-add-remote
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import { ExecException } from 'child_process';
|
||||
|
||||
export = prepare;
|
||||
|
||||
declare function prepare(cwd?: string): prepare.AddRemote;
|
||||
|
||||
declare namespace prepare {
|
||||
interface AddRemote {
|
||||
(
|
||||
name: string,
|
||||
url: string,
|
||||
callback: (error: ExecException | null, stdout: string, stderr: string) => void
|
||||
): void;
|
||||
|
||||
sync(name: string, url: string): void;
|
||||
}
|
||||
}
|
||||
23
types/git-add-remote/tsconfig.json
Normal file
23
types/git-add-remote/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"git-add-remote-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/git-add-remote/tslint.json
Normal file
1
types/git-add-remote/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user