UNPKG

wordnik-api

Version:

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

43 lines (42 loc) 1.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Defines a word. */ class Word { /** * Constructor for a word. * * @param id {string} The id of the word. * @param partOfSpeech {PartOfSpeech} The part of speech of the word. * @param attributionText {string | undefined} The attribution text of the word. * @param attributionUrl {string | undefined} The attribution url of the word. * @param sourceDictionary {string | undefined} The source dictionary of the word. * @param text {string | undefined} The text definition of the word. * @param sequence {string} * @param score {number} The score of the word. * @param lables {Label[]} Word labels. * @param citations {Citation[]} Citations for the word. * @param word {string} The word. * @param relatedWords {RelatedWord[]} Related words. * @param exampleUses {ExampleUse[]} Example uses. * @param wordnikUrl {string} The Wordnik url. */ constructor(id, partOfSpeech, attributionText, attributionUrl, sourceDictionary, text, sequence, score, lables, citations, word, relatedWords, exampleUses, wordnikUrl) { this.id = id; this.partOfSpeech = partOfSpeech; this.attributionText = attributionText; this.attributionUrl = attributionUrl; this.sourceDictionary = sourceDictionary; this.text = text; this.sequence = sequence; this.score = score; this.lables = lables; this.citations = citations; this.word = word; this.relatedWords = relatedWords; this.exampleUses = exampleUses; this.wordnikUrl = wordnikUrl; } } exports.default = Word;