Files
privacy.sexy/src/application/collections/collection.yaml.d.ts
undergroundwires 5bbbb9cecc Refactor to remove code coupling with Webpack
Remove using Webpack import syntax such as: `js-yaml-loader!@/..`. It's
a non-standard syntax that couples the code to Webpack.

Configure instead by specifying Webpack loader in Vue configuration
file.

Enable related ESLint rules.

Remove unused dependency `raw-loader` and refactor
`NoUnintendedInlining` test to load files using file system (dropping
webpack dependency).

Refactor to use `import type` for type imports to show the indent
clearly and satisfy failing ESLint rules.
2022-01-31 17:22:34 +01:00

65 lines
1.7 KiB
TypeScript

declare module '@/application/collections/*' {
export interface CollectionData {
readonly os: string;
readonly scripting: ScriptingDefinitionData;
readonly actions: ReadonlyArray<CategoryData>;
readonly functions?: ReadonlyArray<FunctionData>;
}
export interface CategoryData extends DocumentableData {
readonly children: ReadonlyArray<CategoryOrScriptData>;
readonly category: string;
}
export type CategoryOrScriptData = CategoryData | ScriptData;
export type DocumentationUrlsData = ReadonlyArray<string> | string;
export interface DocumentableData {
readonly docs?: DocumentationUrlsData;
}
export interface InstructionHolder {
readonly name: string;
readonly code?: string;
readonly revertCode?: string;
readonly call?: FunctionCallsData;
}
export interface ParameterDefinitionData {
readonly name: string;
readonly optional?: boolean;
}
export interface FunctionData extends InstructionHolder {
readonly parameters?: readonly ParameterDefinitionData[];
}
export interface FunctionCallParametersData {
readonly [index: string]: string;
}
export interface FunctionCallData {
readonly function: string;
readonly parameters?: FunctionCallParametersData;
}
export type FunctionCallsData = readonly FunctionCallData[] | FunctionCallData | undefined;
export interface ScriptData extends InstructionHolder, DocumentableData {
readonly name: string;
readonly recommend?: string;
}
export interface ScriptingDefinitionData {
readonly language: string;
readonly fileExtension: string;
readonly startCode: string;
readonly endCode: string;
}
const content: CollectionData;
export default content;
}