chore(TypeScript): fix linting and generate .d.ts

This commit is contained in:
harttle
2019-02-17 18:20:04 +08:00
parent 7ee87008c7
commit fc9ebdb90f
79 changed files with 809 additions and 820 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ export default class Scope {
strict_variables: false,
strict_filters: false,
root: []
} , opts)
}, opts)
this.contexts = [ctx || {}]
}
getAll () {
@@ -59,7 +59,7 @@ export default class Scope {
}
return this.contexts.splice(i, 1)[0]
}
findContextFor (key: string, filter = (arg => true)) {
findContextFor (key: string, filter: ((conttext: object) => boolean) = () => true) {
for (let i = this.contexts.length - 1; i >= 0; i--) {
const candidate = this.contexts[i]
if (!filter(candidate)) continue