mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[git-semver-tags] Added type definitions for git-semver-tags (#41440)
This commit is contained in:
parent
e576ea16e4
commit
2d34dc1046
21
types/git-semver-tags/git-semver-tags-tests.ts
Normal file
21
types/git-semver-tags/git-semver-tags-tests.ts
Normal file
@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
|
||||
import gitSemverTags from "git-semver-tags";
|
||||
|
||||
declare const callback: gitSemverTags.Callback;
|
||||
declare const options: gitSemverTags.Options;
|
||||
|
||||
// $ExpectType void
|
||||
gitSemverTags(callback);
|
||||
|
||||
// $ExpectType void
|
||||
gitSemverTags(options, callback);
|
||||
|
||||
// $ExpectError
|
||||
gitSemverTags();
|
||||
|
||||
// $ExpectError
|
||||
gitSemverTags(options);
|
||||
|
||||
// $ExpectError
|
||||
gitSemverTags(callback, options);
|
||||
32
types/git-semver-tags/index.d.ts
vendored
Normal file
32
types/git-semver-tags/index.d.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
// Type definitions for git-semver-tags 3.0
|
||||
// Project: https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/git-semver-tags#readme
|
||||
// Definitions by: Jason Kwok <https://github.com/JasonHK>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
declare function gitSemverTags(callback: gitSemverTags.Callback): void;
|
||||
declare function gitSemverTags(options: gitSemverTags.Options, callback: gitSemverTags.Callback): void;
|
||||
|
||||
declare namespace gitSemverTags {
|
||||
type Callback = (error: any, tags: string[]) => void;
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
* Extract lerna style tags (`foo-package@2.0.0`) from the git history, rather
|
||||
* than `v1.0.0` format.
|
||||
*/
|
||||
lernaTags?: boolean;
|
||||
|
||||
/**
|
||||
* What package should lerna style tags be listed for, e.g., `foo-package`.
|
||||
*/
|
||||
package?: string;
|
||||
|
||||
/**
|
||||
* Specify a prefix for the git tag to be ignored from the semver checks.
|
||||
*/
|
||||
tagPrefix?: string;
|
||||
}
|
||||
}
|
||||
|
||||
export = gitSemverTags;
|
||||
24
types/git-semver-tags/tsconfig.json
Normal file
24
types/git-semver-tags/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"esModuleInterop": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"git-semver-tags-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/git-semver-tags/tslint.json
Normal file
1
types/git-semver-tags/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user