Skip to content

Commit

Permalink
👕 refactor(decls): add vue types
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Mar 7, 2017
1 parent 0e4ac39 commit afb6d8f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions decls/module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
declare type $npm$Vue$Dictionaly<T> = { [key: string]: T }

declare type Util = {
extend: (to: Object, from: ?Object) => Object,
hasOwn: (obj: Object, key: string) => boolean,
isPlainObject: (obj: any) => boolean,
isObject: (obj: mixed) => boolean,
}

declare type Config = {
optionMergeStrategies: $npm$Vue$Dictionaly<Function>,
silent: boolean,
productionTip: boolean,
performance: boolean,
devtools: boolean,
errorHandler: ?(err: Error, vm: Vue, info: string) => void,
ignoredElements: Array<string>,
keyCodes: $npm$Vue$Dictionaly<number>,
isReservedTag: (x?: string) => boolean,
parsePlatformTagName: (x: string) => string,
isUnknownElement: (x?: string) => boolean,
getTagNamespace: (x?: string) => string | void,
mustUseProp: (tag: string, type: ?string, name: string) => boolean,
}

declare interface Vue {
static config: Config,
static util: Util,
static version: string,
}

0 comments on commit afb6d8f

Please sign in to comment.