Skip to content
Permalink
Browse files

Breaking: Add a `schema` property for validation

Fix #2257
Close #2416
  • Loading branch information...
molant committed May 10, 2019
1 parent df0bab5 commit 61c95efcf4745570842e0752484111ac205f48a1
Showing with 11 additions and 0 deletions.
  1. +11 −0 packages/connector-local/src/connector.ts
@@ -79,6 +79,17 @@ export default class LocalConnector implements IConnector {
private filesPattern: string[];
private watcher: chokidar.FSWatcher | null = null;

public static schema = {
additionalProperties: false,
properties: {
pattern: {
items: { type: 'string' },
type: 'array'
},
watch: { type: 'boolean' }
}
}

public constructor(engine: Engine<HTMLEvents>, config: object) {
this._options = Object.assign({}, defaultOptions, config);
this.filesPattern = this.getFilesPattern();

0 comments on commit 61c95ef

Please sign in to comment.
You can’t perform that action at this time.