UNPKG

wordnik-api

Version:

Community API for https://wordnik.com with types

30 lines (29 loc) 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class WordOfTheDay { /** * Word of the day constructor. * * @param _id {string} the ID of the word. * @param word {string} the word. * @param contentProvider {{readonly name: string, readonly id: number}} too lazy to make a class for this. * @param definitions {{readonly source: string, readonly text: string, readonly note: string | null, readonly partOfSpeech: PartOfSpeech}[]} the definitions. * @param publishDate {string} the publish date in ISO8601. * @param examples {Example[]} the examples. * @param pdd {string} the PDD. * @param htmlExtra {string | null} the HTML extra. * @param note {string | null} the note. */ constructor(_id, word, contentProvider, definitions, publishDate, examples, pdd, htmlExtra, note) { this._id = _id; this.word = word; this.contentProvider = contentProvider; this.definitions = definitions; this.publishDate = publishDate; this.examples = examples; this.pdd = pdd; this.htmlExtra = htmlExtra; this.note = note; } } exports.default = WordOfTheDay;