mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #31464 from BendingBender/is-trademarked
[is-trademarked] Add types
This commit is contained in:
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Type definitions for is-trademarked 1.2
|
||||
// Project: https://github.com/egoist/is-trademarked#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = isTrademarked;
|
||||
|
||||
declare function isTrademarked(
|
||||
searchTerm: string,
|
||||
opts?: isTrademarked.Options
|
||||
): Promise<false | isTrademarked.TrademarkedData[]>;
|
||||
|
||||
declare namespace isTrademarked {
|
||||
interface Options {
|
||||
token?: string;
|
||||
}
|
||||
|
||||
interface TrademarkedData {
|
||||
wordmark: string;
|
||||
reg: Date;
|
||||
description: string;
|
||||
sn: string;
|
||||
serviceCode: string;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import isTrademarked = require('is-trademarked');
|
||||
|
||||
// $ExpectType Promise<false | TrademarkedData[]>
|
||||
isTrademarked('unicorns');
|
||||
// $ExpectType Promise<false | TrademarkedData[]>
|
||||
isTrademarked('unicorns', { token: 'foo' });
|
||||
@@ -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",
|
||||
"is-trademarked-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user