UNPKG

english-verbs-helper

Version:

English verbs conjugation

31 lines (30 loc) 1.37 kB
/** * @license * Copyright 2019 Ludan Stoecklé * SPDX-License-Identifier: Apache-2.0 */ export type Tense = 'SIMPLE_PAST' | 'PAST' | 'SIMPLE_PRESENT' | 'PRESENT' | 'SIMPLE_FUTURE' | 'FUTURE' | 'PROGRESSIVE_PAST' | 'PROGRESSIVE_PRESENT' | 'PROGRESSIVE_FUTURE' | 'PERFECT_PAST' | 'PERFECT_PRESENT' | 'PERFECT_FUTURE' | 'PERFECT_PROGRESSIVE_PAST' | 'PERFECT_PROGRESSIVE_PRESENT' | 'PERFECT_PROGRESSIVE_FUTURE' | 'PARTICIPLE_PRESENT' | 'PARTICIPLE_PAST'; export type Person = 0 | 1 | 2 | 3 | 4 | 5; interface EnglishGerunds { [inf: string]: string; } interface EnglishVerbsIrregular { [key: string]: EnglishVerbIrregular; } declare type EnglishVerbIrregular = string[][]; export interface VerbsInfo { [key: string]: VerbInfo; } export type VerbInfo = (string | null)[]; export interface ExtraParams { GOING_TO?: boolean; WILL?: boolean; NEGATIVE?: boolean; CONTRACT?: boolean; NO_DO?: boolean; } export declare function mergeVerbsData(irregularsInfo: EnglishVerbsIrregular, gerundsInfo: EnglishGerunds): VerbsInfo; export declare function getIngPart(verbsInfo: VerbsInfo, verb: string): string; export declare function getVerbInfo(verbsInfo: VerbsInfo, verb: string): VerbInfo | null; export declare function getConjugation(verbsInfo: VerbsInfo, verb: string, tense: Tense, person: Person, extraParams: ExtraParams): string; export {};