@launchmenu/applet-dictionary
Version:
An applet to find dictionary definitions
48 lines • 2.79 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WiktionarySection = void 0;
const WikiSection_1 = require("../../wiki/WikiSection");
const WiktionaryReferences_1 = require("./WiktionaryReferences");
const WiktionarySeeAlso_1 = require("./WiktionarySeeAlso");
const WiktionaryUsageNotes_1 = require("./WiktionaryUsageNotes");
/**
* The standard class for sections in the wiktionary
*/
class WiktionarySection extends WikiSection_1.WikiSection {
/**
* Creates a new local model of a wikipage section
* @param page The page that this section is a part of
* @param info The section info
* @param subsections The ids of child sections
*/
constructor(page, info, subsections) {
super(page, info, subsections);
this.setSubsectionsContents();
}
/**
* Retrieves the references for this section
* @returns The references if present
*/
getReferences() {
var _a;
return (_a = this.findSubsections(WiktionaryReferences_1.WiktionaryReferences)[0]) !== null && _a !== void 0 ? _a : null;
}
/**
* Retrieves the usage notes for this section
* @returns The usage notes if present
*/
getUsageNotes() {
var _a;
return (_a = this.findSubsections(WiktionaryUsageNotes_1.WiktionaryUsageNotes)[0]) !== null && _a !== void 0 ? _a : null;
}
/**
* Retrieves the 'see also' for this section
* @returns The 'see also' if present
*/
getSeeAlso() {
var _a;
return (_a = this.findSubsections(WiktionarySeeAlso_1.WiktionarySeeAlso)[0]) !== null && _a !== void 0 ? _a : null;
}
}
exports.WiktionarySection = WiktionarySection;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiV2lrdGlvbmFyeVNlY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvd2lrdGlvbmFyeS9iYXNlU2VjdGlvbnMvV2lrdGlvbmFyeVNlY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0Esd0RBQW1EO0FBRW5ELGlFQUE0RDtBQUM1RCwyREFBc0Q7QUFDdEQsaUVBQTREO0FBRTVEOztHQUVHO0FBQ0gsTU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