diff --git a/types/stringify-author/index.d.ts b/types/stringify-author/index.d.ts new file mode 100644 index 0000000000..1af0c2ebfd --- /dev/null +++ b/types/stringify-author/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for stringify-author 0.1 +// Project: https://github.com/jonschlinkert/stringify-author +// Definitions by: Manuel Thalmann +// 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; diff --git a/types/stringify-author/stringify-author-tests.ts b/types/stringify-author/stringify-author-tests.ts new file mode 100644 index 0000000000..ecf4d16c95 --- /dev/null +++ b/types/stringify-author/stringify-author-tests.ts @@ -0,0 +1,7 @@ +import stringify = require("stringify-author"); + +stringify({}); +stringify({ name: "", email: "", url: "" }); + +// $ExpectType string +stringify({}); diff --git a/types/stringify-author/tsconfig.json b/types/stringify-author/tsconfig.json new file mode 100644 index 0000000000..fd17bfa07f --- /dev/null +++ b/types/stringify-author/tsconfig.json @@ -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" + ] +} diff --git a/types/stringify-author/tslint.json b/types/stringify-author/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/stringify-author/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }