add support for shared functions #41
This commit is contained in:
48
src/application/application.yaml.d.ts
vendored
48
src/application/application.yaml.d.ts
vendored
@@ -1,16 +1,7 @@
|
||||
declare module 'js-yaml-loader!*' {
|
||||
export type CategoryOrScript = YamlCategory | YamlScript;
|
||||
export type DocumentationUrls = ReadonlyArray<string> | string;
|
||||
|
||||
export interface YamlDocumentable {
|
||||
docs?: DocumentationUrls;
|
||||
}
|
||||
|
||||
export interface YamlScript extends YamlDocumentable {
|
||||
name: string;
|
||||
code: string;
|
||||
revertCode: string;
|
||||
recommend: string | undefined;
|
||||
export interface ApplicationYaml {
|
||||
actions: ReadonlyArray<YamlCategory>;
|
||||
functions: ReadonlyArray<YamlFunction> | undefined;
|
||||
}
|
||||
|
||||
export interface YamlCategory extends YamlDocumentable {
|
||||
@@ -18,8 +9,37 @@ declare module 'js-yaml-loader!*' {
|
||||
category: string;
|
||||
}
|
||||
|
||||
export interface ApplicationYaml {
|
||||
actions: ReadonlyArray<YamlCategory>;
|
||||
export type CategoryOrScript = YamlCategory | YamlScript;
|
||||
export type DocumentationUrls = ReadonlyArray<string> | string;
|
||||
|
||||
export interface YamlDocumentable {
|
||||
docs?: DocumentationUrls;
|
||||
}
|
||||
|
||||
export interface YamlFunction {
|
||||
name: string;
|
||||
code: string;
|
||||
revertCode?: string;
|
||||
parameters?: readonly string[];
|
||||
}
|
||||
|
||||
export interface FunctionCallParameters {
|
||||
[index: string]: string;
|
||||
}
|
||||
|
||||
export interface FunctionCall {
|
||||
function: string;
|
||||
parameters?: FunctionCallParameters;
|
||||
}
|
||||
|
||||
export type ScriptFunctionCall = readonly FunctionCall[] | FunctionCall | undefined;
|
||||
|
||||
export interface YamlScript extends YamlDocumentable {
|
||||
name: string;
|
||||
code: string | undefined;
|
||||
revertCode: string | undefined;
|
||||
call: ScriptFunctionCall;
|
||||
recommend: string | undefined;
|
||||
}
|
||||
|
||||
const content: ApplicationYaml;
|
||||
|
||||
Reference in New Issue
Block a user