Add definitions for cleasby-vigfusson-dictionary (#50107)

This commit is contained in:
Sampo Silvennoinen
2020-12-14 22:34:01 +02:00
committed by GitHub
parent 8ab0f5c803
commit cc13deeaa2
4 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
import { getDictionary, getNoMarkupDictionary } from 'cleasby-vigfusson-dictionary';
// $ExpectType DictionaryEntry[]
const result = getDictionary();
// $ExpectType DictionaryEntry[]
const result2 = getNoMarkupDictionary();

View File

@@ -0,0 +1,12 @@
// Type definitions for cleasby-vigfusson-dictionary 1.0
// Project: https://github.com/stscoundrel/cleasby-vigfusson-dictionary
// Definitions by: StScoundrel <https://github.com/stscoundrel>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface DictionaryEntry {
word: string;
definitions: string[];
}
export function getDictionary(): DictionaryEntry[];
export function getNoMarkupDictionary(): DictionaryEntry[];

View 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",
"cleasby-vigfusson-dictionary-tests.ts"
]
}

View File

@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}