Skip to content

Commit b085fe4

Browse files
committed
Convert the package to an ESModule
1 parent f08f84d commit b085fe4

File tree

110 files changed

+7879
-4395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+7879
-4395
lines changed

.eslintrc.js .eslintrc.cjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const { join } = require("path");
2-
const ESLintPresets = require("@manuth/eslint-plugin-typescript");
1+
const { join } = require("node:path");
2+
const { PluginName, PresetName } = require("@manuth/eslint-plugin-typescript");
33

44
module.exports = {
55
extends: [
6-
`plugin:${ESLintPresets.PluginName}/${ESLintPresets.PresetName.RecommendedWithTypeChecking}`
6+
`plugin:${PluginName}/${PresetName.RecommendedWithTypeChecking}`
77
],
88
env: {
99
node: true,

package-lock.json

+7,169-3,620
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@manuth/generator-wsc-package",
33
"version": "3.0.3",
4-
"type": "commonjs",
4+
"type": "module",
55
"description": "A Generator for WoltLab Suite Core Packages.",
66
"author": "Manuel Thalmann <[email protected]>",
77
"license": "MIT",
@@ -31,42 +31,43 @@
3131
"rebuild": "npm run clean && npm run build",
3232
"watch": "npm run build -- --watch",
3333
"clean": "npm run build -- --clean && rimraf ./lib",
34-
"lint": "eslint --max-warnings 0 ./src .eslintrc.js",
34+
"lint": "eslint --max-warnings 0 ./src .eslintrc.cjs",
3535
"lint-ide": "npm run lint || exit 0",
3636
"test": "mocha",
3737
"prepare": "npm run patch-ts && npm run rebuild",
3838
"patch-ts": "ts-patch install"
3939
},
4040
"dependencies": {
41-
"@manuth/extended-yo-generator": "^11.0.7",
42-
"@manuth/generator-ts-project": "^3.1.0",
43-
"@manuth/package-json-editor": "^2.2.6",
41+
"@manuth/extended-yo-generator": "^12.1.2",
42+
"@manuth/generator-ts-project": "^4.0.3",
43+
"@manuth/package-json-editor": "^3.0.2",
4444
"@manuth/temp-files": "^2.0.9",
4545
"chalk": "^4.1.2",
4646
"dedent": "^0.7.0",
47+
"dependency-package-path": "^1.0.0",
4748
"fs-extra": "^10.1.0",
4849
"inquirer": "^8.2.4",
4950
"lodash.kebabcase": "^4.1.1",
5051
"pascalcase": "^1.0.0",
51-
"ts-morph": "^15.1.0",
52+
"ts-morph": "^16.0.0",
5253
"upath": "^2.0.1",
5354
"yosay": "^2.0.2"
5455
},
5556
"devDependencies": {
5657
"@manuth/eslint-plugin-typescript": "^3.3.4",
57-
"@manuth/extended-yo-generator-test": "^11.0.7",
58-
"@manuth/generator-ts-project-test": "^3.1.0",
58+
"@manuth/extended-yo-generator-test": "^12.1.2",
59+
"@manuth/generator-ts-project-test": "^4.0.3",
5960
"@manuth/tsconfig": "^3.0.2",
6061
"@manuth/woltlab-compiler": "^3.0.1",
6162
"@types/dedent": "^0.7.0",
6263
"@types/fs-extra": "^9.0.13",
6364
"@types/inquirer": "^8.2.3",
6465
"@types/lodash.kebabcase": "^4.1.7",
6566
"@types/mocha": "^9.1.1",
66-
"@types/mock-require": "^2.0.1",
6767
"@types/mute-stream": "^0.0.1",
6868
"@types/node": "^18.7.16",
6969
"@types/npm": "^7.19.0",
70+
"@types/npm-which": "^3.0.1",
7071
"@types/pascalcase": "^1.0.1",
7172
"@types/sinon": "^10.0.13",
7273
"@types/ts-nameof": "^4.2.1",
@@ -75,9 +76,9 @@
7576
"@types/yosay": "2.0.1",
7677
"eslint": "^8.23.0",
7778
"mocha": "^10.0.0",
78-
"mock-require": "^3.0.3",
7979
"mock-stdin": "^1.0.0",
8080
"mute-stream": "^0.0.8",
81+
"npm-which": "^3.0.1",
8182
"random-js": "^2.1.0",
8283
"rimraf": "^3.0.2",
8384
"sinon": "^14.0.0",

src/Components/FileInstructionComponent.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { GeneratorOptions } from "@manuth/extended-yo-generator";
2-
import { IWoltLabComponentOptions } from "../Settings/IWoltLabComponentOptions";
3-
import { IWoltLabSettings } from "../Settings/IWoltLabSettings";
4-
import { InstructionComponent } from "./InstructionComponent";
2+
import { IWoltLabComponentOptions } from "../Settings/IWoltLabComponentOptions.js";
3+
import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js";
4+
import { InstructionComponent } from "./InstructionComponent.js";
55

66
/**
77
* Provides a component for generating instruction-files with a `FileName`-property.

src/Components/FileUploadComponentBase.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { GeneratorOptions, IFileMapping, Question } from "@manuth/extended-yo-generator";
2-
import { FileUploadMapping } from "../FileMappings/FileUploadMapping";
3-
import { IFileUploadComponentOptions } from "../Settings/IFileUploadComponentOptions";
4-
import { IWoltLabSettings } from "../Settings/IWoltLabSettings";
5-
import { WoltLabGenerator } from "../WoltLabGenerator";
6-
import { ApplicationPrompt } from "./Inquiry/Prompts/ApplicationPrompt";
7-
import { IApplicationQuestion } from "./Inquiry/Prompts/IApplicationQuestion";
8-
import { LocalInstructionComponent } from "./LocalInstructionComponent";
2+
import { FileUploadMapping } from "../FileMappings/FileUploadMapping.js";
3+
import { IFileUploadComponentOptions } from "../Settings/IFileUploadComponentOptions.js";
4+
import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js";
5+
import { WoltLabGenerator } from "../WoltLabGenerator.js";
6+
import { ApplicationPrompt } from "./Inquiry/Prompts/ApplicationPrompt.js";
7+
import { IApplicationQuestion } from "./Inquiry/Prompts/IApplicationQuestion.js";
8+
import { LocalInstructionComponent } from "./LocalInstructionComponent.js";
99

1010
/**
1111
* Provides a component for file-uploads.
@@ -62,7 +62,7 @@ export abstract class FileUploadComponentBase<TSettings extends IWoltLabSettings
6262
}
6363
}
6464

65-
return result;
65+
return result as any;
6666
}
6767

6868
/**

src/Components/Inquiry/Prompts/ApplicationPrompt.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { ReadLine } from "readline";
22
import { NestedPrompt } from "@manuth/generator-ts-project";
3-
import { Answers, ChoiceCollection, DistinctQuestion, prompt } from "inquirer";
4-
import { IApplicationAnswerHash } from "./IApplicationAnswerHash";
5-
import { IApplicationQuestion } from "./IApplicationQuestion";
6-
import { IApplicationQuestionOptions } from "./IApplicationQuestionOptions";
7-
import { ISuggestionOptions } from "./ISuggestionOptions";
8-
import { IWoltLabApplication } from "./IWoltLabApplication";
3+
import inquirer, { Answers, ChoiceCollection, DistinctQuestion } from "inquirer";
4+
import { IApplicationAnswerHash } from "./IApplicationAnswerHash.js";
5+
import { IApplicationQuestion } from "./IApplicationQuestion.js";
6+
import { IApplicationQuestionOptions } from "./IApplicationQuestionOptions.js";
7+
import { ISuggestionOptions } from "./ISuggestionOptions.js";
8+
import { IWoltLabApplication } from "./IWoltLabApplication.js";
99

1010
declare module "inquirer"
1111
{
@@ -164,7 +164,7 @@ export class ApplicationPrompt<T extends IApplicationQuestionOptions> extends Ne
164164
when: (answers) => answers.application === null || answers.application === undefined
165165
});
166166

167-
let result = await prompt<IApplicationAnswerHash>(questions);
167+
let result = await inquirer.prompt<IApplicationAnswerHash>(questions);
168168
return result.application ?? result.customApplication;
169169
}
170170
}

src/Components/Inquiry/Prompts/IApplicationAnswerHash.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2-
import { ApplicationPrompt } from "./ApplicationPrompt";
2+
import { ApplicationPrompt } from "./ApplicationPrompt.js";
33

44
/**
55
* The internal answer-hash of the {@link ApplicationPrompt `ApplicationPrompt<T>`}.

src/Components/Inquiry/Prompts/IApplicationQuestion.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Answers } from "inquirer";
2-
import { ApplicationPrompt } from "./ApplicationPrompt";
3-
import { IApplicationQuestionOptions } from "./IApplicationQuestionOptions";
2+
import { ApplicationPrompt } from "./ApplicationPrompt.js";
3+
import { IApplicationQuestionOptions } from "./IApplicationQuestionOptions.js";
44

55
/**
66
* Provides options for the {@link ApplicationPrompt `ApplicationPrompt<T>`}.

src/Components/Inquiry/Prompts/IApplicationQuestionOptions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Answers, AsyncDynamicQuestionProperty, InputQuestionOptions } from "inquirer";
22
// eslint-disable-next-line @typescript-eslint/no-unused-vars
3-
import { ApplicationPrompt } from "./ApplicationPrompt";
4-
import { ISuggestionOptions } from "./ISuggestionOptions";
3+
import { ApplicationPrompt } from "./ApplicationPrompt.js";
4+
import { ISuggestionOptions } from "./ISuggestionOptions.js";
55

66
/**
77
* Provides options for the {@link ApplicationPrompt `ApplicationPrompt<T>`}.

src/Components/Inquiry/Prompts/ISuggestionOptions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IWoltLabApplication } from "./IWoltLabApplication";
1+
import { IWoltLabApplication } from "./IWoltLabApplication.js";
22

33
/**
44
* Provides options for application-suggestions.

src/Components/Inquiry/WoltLabIdentifierQuestion.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { URL } from "url";
22
import { GeneratorOptions } from "@manuth/extended-yo-generator";
33
import { QuestionBase, TSProjectSettingKey } from "@manuth/generator-ts-project";
4-
import { IWoltLabSettings } from "../../Settings/IWoltLabSettings";
5-
import { WoltLabSettingKey } from "../../Settings/WoltLabSettingKey";
4+
import { IWoltLabSettings } from "../../Settings/IWoltLabSettings.js";
5+
import { WoltLabSettingKey } from "../../Settings/WoltLabSettingKey.js";
66

77
/**
88
* Represents a question for asking for the package-identifier.

src/Components/InstructionComponent.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { relative } from "path";
22
import { GeneratorOptions, IFileMapping, Question } from "@manuth/extended-yo-generator";
33
import { IPathQuestion } from "@manuth/generator-ts-project";
4-
import { PackageInstructionTransformer } from "../FileMappings/PackageInstructionTransformer";
5-
import { IWoltLabComponentOptions } from "../Settings/IWoltLabComponentOptions";
6-
import { IWoltLabSettings } from "../Settings/IWoltLabSettings";
7-
import { WoltLabComponent } from "./WoltLabComponent";
4+
import { PackageInstructionTransformer } from "../FileMappings/PackageInstructionTransformer.js";
5+
import { IWoltLabComponentOptions } from "../Settings/IWoltLabComponentOptions.js";
6+
import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js";
7+
import { WoltLabComponent } from "./WoltLabComponent.js";
88

99
/**
1010
* Provides a component for generating an instruction-file.
@@ -65,15 +65,15 @@ export abstract class InstructionComponent<TSettings extends IWoltLabSettings, T
6565
*/
6666
protected override get PathQuestion(): Question<TComponentOptions>
6767
{
68-
let question = super.PathQuestion as IPathQuestion<TComponentOptions>;
68+
let question = super.PathQuestion as any as IPathQuestion<TComponentOptions>;
6969

7070
question.rootDir = {
7171
path: this.Generator.sourcePath(),
7272
allowOutside: false
7373
};
7474

7575
question.default ??= relative(this.Generator.sourcePath(), this.InstructionFileName);
76-
return question;
76+
return question as any;
7777
}
7878

7979
/**

src/Components/ListenerComponentBase.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { GeneratorOptions, IFileMapping } from "@manuth/extended-yo-generator";
2-
import { ListenerInstructionFileMapping } from "../FileMappings/ListenerInstructionFileMapping";
3-
import { IWoltLabComponentOptions } from "../Settings/IWoltLabComponentOptions";
4-
import { IWoltLabSettings } from "../Settings/IWoltLabSettings";
5-
import { WoltLabGenerator } from "../WoltLabGenerator";
6-
import { FileInstructionComponent } from "./FileInstructionComponent";
2+
import { ListenerInstructionFileMapping } from "../FileMappings/ListenerInstructionFileMapping.js";
3+
import { IWoltLabComponentOptions } from "../Settings/IWoltLabComponentOptions.js";
4+
import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js";
5+
import { WoltLabGenerator } from "../WoltLabGenerator.js";
6+
import { FileInstructionComponent } from "./FileInstructionComponent.js";
77

88
/**
99
* Provides a component for generating template- or event-listeners.

src/Components/LocalInstructionComponent.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { GeneratorOptions, IFileMapping, Question } from "@manuth/extended-yo-generator";
22
import { IPathQuestion, PathPrompt } from "@manuth/generator-ts-project";
3-
import { LocalFileInstructionMapping } from "../FileMappings/LocalFileInstructionMapping";
4-
import { ILocalComponentOptions } from "../Settings/ILocalComponentOptions";
5-
import { IWoltLabSettings } from "../Settings/IWoltLabSettings";
6-
import { InstructionComponent } from "./InstructionComponent";
3+
import { LocalFileInstructionMapping } from "../FileMappings/LocalFileInstructionMapping.js";
4+
import { ILocalComponentOptions } from "../Settings/ILocalComponentOptions.js";
5+
import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js";
6+
import { InstructionComponent } from "./InstructionComponent.js";
77

88
/**
99
* Provides a component for generating instruction-files which are loaded from local.
@@ -46,7 +46,7 @@ export abstract class LocalInstructionComponent<TSettings extends IWoltLabSettin
4646
{
4747
return [
4848
...super.ComponentOptionQuestionCollection,
49-
this.SourceQuestion
49+
this.SourceQuestion as any as Question<TComponentOptions>
5050
];
5151
}
5252

src/Components/NodeSystemComponent.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { GeneratorOptions, IFileMapping } from "@manuth/extended-yo-generator";
2-
import { NodeInstructionFileMapping } from "../FileMappings/NodeInstructionFileMapping";
3-
import { IWoltLabComponentOptions } from "../Settings/IWoltLabComponentOptions";
4-
import { IWoltLabSettings } from "../Settings/IWoltLabSettings";
5-
import { WoltLabGenerator } from "../WoltLabGenerator";
6-
import { FileInstructionComponent } from "./FileInstructionComponent";
2+
import { NodeInstructionFileMapping } from "../FileMappings/NodeInstructionFileMapping.js";
3+
import { IWoltLabComponentOptions } from "../Settings/IWoltLabComponentOptions.js";
4+
import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js";
5+
import { WoltLabGenerator } from "../WoltLabGenerator.js";
6+
import { FileInstructionComponent } from "./FileInstructionComponent.js";
77

88
/**
99
* Provides a component for generating node-system instructions.

src/Components/VSCode/WoltLabExtensionsProcessor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { GeneratorOptions } from "@manuth/extended-yo-generator";
22
import { CodeWorkspaceComponent, ITSProjectSettings, TSProjectExtensionsProcessor } from "@manuth/generator-ts-project";
33
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4-
import { WoltLabGenerator } from "../../WoltLabGenerator";
4+
import { WoltLabGenerator } from "../../WoltLabGenerator.js";
55

66
/**
77
* Provides the functionality to process extensions for {@link WoltLabGenerator `WoltLabGenerator<TSettings, TOptions>`}s.

src/Components/VSCode/WoltLabLaunchSettingsProcessor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { GeneratorOptions } from "@manuth/extended-yo-generator";
22
import { CodeWorkspaceComponent, ITSProjectSettings, TSProjectLaunchSettingsProcessor } from "@manuth/generator-ts-project";
33
import { DebugConfiguration } from "vscode";
44
// eslint-disable-next-line @typescript-eslint/no-unused-vars
5-
import { WoltLabGenerator } from "../../WoltLabGenerator";
5+
import { WoltLabGenerator } from "../../WoltLabGenerator.js";
66

77
/**
88
* Provides the functionality to process debug-configurations for {@link WoltLabGenerator `WoltLabGenerator<TSettings, TOptions>`}s.

src/Components/VSCode/WoltLabSettingsProcessor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { GeneratorOptions } from "@manuth/extended-yo-generator";
22
import { CodeWorkspaceComponent, ITSProjectSettings, TSProjectSettingsProcessor } from "@manuth/generator-ts-project";
33
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4-
import { WoltLabGenerator } from "../../WoltLabGenerator";
4+
import { WoltLabGenerator } from "../../WoltLabGenerator.js";
55

66
/**
77
* Provides the functionality to process settings for {@link WoltLabGenerator `WoltLabGenerator<TSettings, TOptions>`}s.

src/Components/VSCode/WoltLabTasksProcessor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { GeneratorOptions } from "@manuth/extended-yo-generator";
22
import { CodeWorkspaceComponent, ITSProjectSettings, TSProjectTasksProcessor } from "@manuth/generator-ts-project";
33
import { TaskDefinition } from "vscode";
44
// eslint-disable-next-line @typescript-eslint/no-unused-vars
5-
import { WoltLabGenerator } from "../../WoltLabGenerator";
5+
import { WoltLabGenerator } from "../../WoltLabGenerator.js";
66

77
/**
88
* Provides the functionality to process tasks for {@link WoltLabGenerator `WoltLabGenerator<TSettings, TOptions>`}s.

src/Components/VSCode/WoltLabWorkspaceProcessor.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { GeneratorOptions } from "@manuth/extended-yo-generator";
22
import { CodeWorkspaceComponent, IExtensionSettings, ILaunchSettings, ITaskSettings, ITSProjectSettings, JSONProcessor, TSProjectWorkspaceProcessor } from "@manuth/generator-ts-project";
33
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4-
import { WoltLabGenerator } from "../../WoltLabGenerator";
5-
import { WoltLabExtensionsProcessor } from "./WoltLabExtensionsProcessor";
6-
import { WoltLabLaunchSettingsProcessor } from "./WoltLabLaunchSettingsProcessor";
7-
import { WoltLabSettingsProcessor } from "./WoltLabSettingsProcessor";
8-
import { WoltLabTasksProcessor } from "./WoltLabTasksProcessor";
4+
import { WoltLabGenerator } from "../../WoltLabGenerator.js";
5+
import { WoltLabExtensionsProcessor } from "./WoltLabExtensionsProcessor.js";
6+
import { WoltLabLaunchSettingsProcessor } from "./WoltLabLaunchSettingsProcessor.js";
7+
import { WoltLabSettingsProcessor } from "./WoltLabSettingsProcessor.js";
8+
import { WoltLabTasksProcessor } from "./WoltLabTasksProcessor.js";
99

1010
/**
1111
* Provides the functionality to process code-workspaces for {@link WoltLabGenerator `WoltLabGenerator<TSettings, TOptions>`}s.

src/Components/WoltLabCodeWorkspaceFolder.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { GeneratorOptions, ObjectExtensionFactory } from "@manuth/extended-yo-generator";
22
import { CodeWorkspaceProvider, ITSProjectSettings, IWorkspaceMetadata, JSONProcessor, TSProjectCodeWorkspaceFolder } from "@manuth/generator-ts-project";
3-
import { IWoltLabSettings } from "../Settings/IWoltLabSettings";
4-
import { WoltLabGenerator } from "../WoltLabGenerator";
5-
import { WoltLabWorkspaceProcessor } from "./VSCode/WoltLabWorkspaceProcessor";
3+
import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js";
4+
import { WoltLabGenerator } from "../WoltLabGenerator.js";
5+
import { WoltLabWorkspaceProcessor } from "./VSCode/WoltLabWorkspaceProcessor.js";
66

77
/**
88
* Provides a component for creating a code-workspace for {@link WoltLabGenerator `WoltLabGenerator<TSettings, TOptions>`}s.

src/Components/WoltLabComponent.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { ComponentOptions, GeneratorOptions, Question } from "@manuth/extended-yo-generator";
22
import { PathPrompt, QuestionSetPrompt } from "@manuth/generator-ts-project";
3-
import inquirer = require("inquirer");
4-
import { IWoltLabComponentOptions } from "../Settings/IWoltLabComponentOptions";
5-
import { IWoltLabSettings } from "../Settings/IWoltLabSettings";
6-
import { WoltLabComponentSettingKey } from "../Settings/WoltLabComponentSettingKey";
7-
import { WoltLabSettingKey } from "../Settings/WoltLabSettingKey";
8-
import { WoltLabGenerator } from "../WoltLabGenerator";
3+
import inquirer, { DistinctQuestion, QuestionTypeName } from "inquirer";
4+
import { IWoltLabComponentOptions } from "../Settings/IWoltLabComponentOptions.js";
5+
import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js";
6+
import { WoltLabComponentSettingKey } from "../Settings/WoltLabComponentSettingKey.js";
7+
import { WoltLabSettingKey } from "../Settings/WoltLabSettingKey.js";
8+
import { WoltLabGenerator } from "../WoltLabGenerator.js";
99

1010
/**
1111
* Represents a woltlab-component.
@@ -52,10 +52,10 @@ export abstract class WoltLabComponent<TSettings extends IWoltLabSettings, TOpti
5252
protected get PathQuestion(): Question<TComponentOptions>
5353
{
5454
return {
55-
type: PathPrompt.TypeName,
55+
type: PathPrompt.TypeName as QuestionTypeName,
5656
message: "Where do you want to store the component?",
5757
name: WoltLabComponentSettingKey.Path
58-
};
58+
} as DistinctQuestion<TComponentOptions> as any;
5959
}
6060

6161
/**
@@ -83,11 +83,11 @@ export abstract class WoltLabComponent<TSettings extends IWoltLabSettings, TOpti
8383
protected get ComponentOptionQuestion(): Question<TSettings>
8484
{
8585
return {
86-
type: QuestionSetPrompt.TypeName,
86+
type: QuestionSetPrompt.TypeName as QuestionTypeName,
8787
name: `${WoltLabSettingKey.ComponentOptions}[${this.ID}]`,
8888
promptTypes: this.PromptTypes,
8989
questions: this.ComponentOptionQuestionCollection as Question[]
90-
};
90+
} as DistinctQuestion<TSettings> as any;
9191
}
9292

9393
/**

0 commit comments

Comments
 (0)