@manuth/generator-wsc-package
Version:
A Generator for WoltLab Suite Core Packages.
52 lines • 2.06 kB
JavaScript
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
import { TSProjectSettingsProcessor } from "@manuth/generator-ts-project";
/**
* Provides the functionality to process settings for {@link WoltLabGenerator `WoltLabGenerator<TSettings, TOptions>`}s.
*
* @template TSettings
* The type of the settings of the generator.
*
* @template TOptions
* The type of the options of the generator.
*/
export class WoltLabSettingsProcessor extends TSProjectSettingsProcessor {
/**
* Initializes a new instance of the {@link WoltLabSettingsProcessor `WoltLabSettingsProcessor<TSettings, TOptions>`} class.
*
* @param component
* The component of the processor.
*/
constructor(component) {
super(component);
}
/**
* @inheritdoc
*
* @param key
* The key of the setting.
*
* @param value
* The value of the setting to filter.
*
* @returns
* A value indicating whether the setting with the specified key should be included.
*/
FilterSetting(key, value) {
const _super = Object.create(null, {
FilterSetting: { get: () => super.FilterSetting }
});
return __awaiter(this, void 0, void 0, function* () {
return (yield _super.FilterSetting.call(this, key, value)) &&
!key.startsWith("mochaExplorer.");
});
}
}
//# sourceMappingURL=WoltLabSettingsProcessor.js.map