mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add types for the stringify-author package (#45835)
This commit is contained in:
parent
28ff829fd7
commit
4620e42e5a
19
types/stringify-author/index.d.ts
vendored
Normal file
19
types/stringify-author/index.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// Type definitions for stringify-author 0.1
|
||||
// Project: https://github.com/jonschlinkert/stringify-author
|
||||
// Definitions by: Manuel Thalmann <https://github.com/manuth>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { Author } from "parse-author";
|
||||
|
||||
/**
|
||||
* Converts an `author` to a human-readable string.
|
||||
*
|
||||
* @param author
|
||||
* The author to stringify.
|
||||
*
|
||||
* @returns
|
||||
* A string representing the `author`.
|
||||
*/
|
||||
declare function stringify(author: Author): string;
|
||||
|
||||
export = stringify;
|
||||
7
types/stringify-author/stringify-author-tests.ts
Normal file
7
types/stringify-author/stringify-author-tests.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import stringify = require("stringify-author");
|
||||
|
||||
stringify({});
|
||||
stringify({ name: "", email: "", url: "" });
|
||||
|
||||
// $ExpectType string
|
||||
stringify({});
|
||||
23
types/stringify-author/tsconfig.json
Normal file
23
types/stringify-author/tsconfig.json
Normal 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",
|
||||
"stringify-author-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/stringify-author/tslint.json
Normal file
1
types/stringify-author/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user