mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-01-30 13:37:35 +00:00
* [serverless] extend plugin types * [serverless] cover plugin types with tests * [serverless] fix lint * [serverless] fix identation
38 lines
817 B
TypeScript
38 lines
817 B
TypeScript
import Serverless from 'serverless';
|
|
import Plugin from 'serverless/classes/Plugin';
|
|
|
|
const options: Serverless.Options = {
|
|
noDeploy: false,
|
|
stage: null,
|
|
region: '',
|
|
};
|
|
|
|
const serverless = new Serverless();
|
|
|
|
class CustomPlugin extends Plugin {
|
|
commands = {
|
|
command: {
|
|
usage: 'description',
|
|
lifecycleEvents: ['start'],
|
|
options: {
|
|
option: {
|
|
usage: `description`,
|
|
required: true,
|
|
shortcut: 'o',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
customProp = {};
|
|
|
|
hooks: Plugin.Hooks;
|
|
|
|
constructor(serverless: Serverless, options: Serverless.Options) {
|
|
super(serverless, options);
|
|
this.hooks = {
|
|
'command:start': () => {},
|
|
};
|
|
}
|
|
}
|