Просмотр исходного кода

add semicolons to inline flow type declarations to workaround babel-sublime highligting issue

Evan You 9 лет назад
Родитель
Сommit
f33ca991ac

+ 3 - 3
src/compiler/codegen/index.js

@@ -5,9 +5,9 @@ import { baseWarn, pluckModuleFunction } from '../helpers'
 import baseDirectives from '../directives/index'
 import baseDirectives from '../directives/index'
 import { camelize, no } from 'shared/util'
 import { camelize, no } from 'shared/util'
 
 
-type TransformFunction = (el: ASTElement, code: string) => string
-type DataGenFunction = (el: ASTElement) => string
-type DirctiveFunction = (el: ASTElement, dir: ASTDirective, warn: Function) => boolean
+type TransformFunction = (el: ASTElement, code: string) => string;
+type DataGenFunction = (el: ASTElement) => string;
+type DirctiveFunction = (el: ASTElement, dir: ASTDirective, warn: Function) => boolean;
 
 
 // configurable state
 // configurable state
 let warn
 let warn

+ 1 - 1
src/core/config.js

@@ -20,7 +20,7 @@ export type Config = {
   _assetTypes: Array<string>;
   _assetTypes: Array<string>;
   _lifecycleHooks: Array<string>;
   _lifecycleHooks: Array<string>;
   _maxUpdateCount: number;
   _maxUpdateCount: number;
-}
+};
 
 
 const config: Config = {
 const config: Config = {
   /**
   /**

+ 1 - 1
src/core/util/props.js

@@ -9,7 +9,7 @@ type PropOptions = {
   default: any,
   default: any,
   required: ?boolean,
   required: ?boolean,
   validator: ?Function
   validator: ?Function
-}
+};
 
 
 export function validateProp (
 export function validateProp (
   key: string,
   key: string,

+ 1 - 1
src/platforms/web/runtime/modules/dom-props.js

@@ -46,7 +46,7 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
 }
 }
 
 
 // check platforms/web/util/attrs.js acceptValue
 // check platforms/web/util/attrs.js acceptValue
-type acceptValueElm = HTMLInputElement | HTMLSelectElement | HTMLOptionElement
+type acceptValueElm = HTMLInputElement | HTMLSelectElement | HTMLOptionElement;
 
 
 function shouldUpdateValue (
 function shouldUpdateValue (
   elm: acceptValueElm,
   elm: acceptValueElm,

+ 1 - 1
src/platforms/weex/compiler/modules/class.js

@@ -10,7 +10,7 @@ import {
 type StaticClassResult = {
 type StaticClassResult = {
   dynamic: boolean,
   dynamic: boolean,
   classResult: string
   classResult: string
-}
+};
 
 
 function transformNode (el: ASTElement, options: CompilerOptions) {
 function transformNode (el: ASTElement, options: CompilerOptions) {
   const warn = options.warn || baseWarn
   const warn = options.warn || baseWarn

+ 1 - 1
src/platforms/weex/compiler/modules/style.js

@@ -11,7 +11,7 @@ import {
 type StaticStyleResult = {
 type StaticStyleResult = {
   dynamic: boolean,
   dynamic: boolean,
   styleResult: string
   styleResult: string
-}
+};
 
 
 const normalize = cached(camelize)
 const normalize = cached(camelize)
 
 

+ 1 - 1
src/server/render-context.js

@@ -14,7 +14,7 @@ type RenderState = {
   buffer: Array<string>;
   buffer: Array<string>;
   bufferIndex: number;
   bufferIndex: number;
   key: string;
   key: string;
-}
+};
 
 
 export class RenderContext {
 export class RenderContext {
   activeInstance: Component;
   activeInstance: Component;

+ 1 - 1
src/sfc/parser.js

@@ -10,7 +10,7 @@ const isSpecialTag = makeMap('script,style,template', true)
 type Attribute = {
 type Attribute = {
   name: string,
   name: string,
   value: string
   value: string
-}
+};
 
 
 /**
 /**
  * Parse a single-file component (*.vue) file into an SFC Descriptor Object.
  * Parse a single-file component (*.vue) file into an SFC Descriptor Object.