Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Jun 11, 2020
1 parent 520d31a commit 204cca9
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 12 deletions.
@@ -1,8 +1,12 @@
/**
* @see https://github.com/estree/estree
*/
import { BaseNode, HasParentNode } from '../node'
import { Token } from '../node'
import { ParseError } from '../errors'
import * as V from './v-ast'
import * as TS from './ts-ast'
import * as JSX from './jsx-ast'

export type ESNode =
| Identifier
Expand Down Expand Up @@ -264,6 +268,8 @@ export type Expression =
| MetaProperty
| Identifier
| AwaitExpression
| JSX.JSXElement
| JSX.JSXFragment
| TS.TSAsExpression

export interface Identifier extends HasParentNode {
Expand Down Expand Up @@ -504,7 +510,7 @@ export interface AssignmentPattern extends HasParentNode {
right: Expression
}

type _FunctionParameter =
export type _FunctionParameter =
| AssignmentPattern
| RestElement
| ArrayPattern
Expand Down
@@ -1,3 +1,7 @@
/**
* @see https://github.com/facebook/jsx/blob/master/AST.md
* @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree/src/ts-estree/ts-estree.ts
*/
import { HasParentNode } from '../node'
import * as ES from './es-ast'

Expand Down
@@ -1,3 +1,6 @@
/**
* @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree/src/ts-estree/ts-estree.ts
*/
import { HasParentNode } from '../node'
import * as ES from './es-ast'
export type TSNode = TSAsExpression
Expand Down
@@ -1,23 +1,26 @@
/**
* @see https://github.com/mysticatea/vue-eslint-parser/blob/master/docs/ast.md
*/
import { HasParentNode, BaseNode } from '../node'
import { Token, HTMLComment, HTMLBogusComment, Comment } from '../node'
import { ParseError } from '../errors'
import * as ES from './es-ast'

export const NS: Readonly<{
export type NS = {
HTML: 'http://www.w3.org/1999/xhtml'
MathML: 'http://www.w3.org/1998/Math/MathML'
SVG: 'http://www.w3.org/2000/svg'
XLink: 'http://www.w3.org/1999/xlink'
XML: 'http://www.w3.org/XML/1998/namespace'
XMLNS: 'http://www.w3.org/2000/xmlns/'
}>
}
export type Namespace =
| typeof NS.HTML
| typeof NS.MathML
| typeof NS.SVG
| typeof NS.XLink
| typeof NS.XML
| typeof NS.XMLNS
| NS['HTML']
| NS['MathML']
| NS['SVG']
| NS['XLink']
| NS['XML']
| NS['XMLNS']
export interface VVariable {
id: ES.Identifier
kind: 'v-for' | 'scope'
Expand All @@ -42,7 +45,7 @@ export interface VOnExpression extends HasParentNode {
export interface VSlotScopeExpression extends HasParentNode {
type: 'VSlotScopeExpression'
parent: VExpressionContainer
params: ES.Pattern[]
params: ES._FunctionParameter[]
}
export interface VFilterSequenceExpression extends HasParentNode {
type: 'VFilterSequenceExpression'
Expand Down
Expand Up @@ -20,7 +20,7 @@ export interface ParserServices {
getDocumentFragment?: () => VAST.VDocumentFragment
}
export namespace ParserServices {
interface TokenStore {
export interface TokenStore {
getTokenByRangeStart(
offset: number,
options?: { includeComments: boolean }
Expand Down
2 changes: 1 addition & 1 deletion typings/vue-eslint-parser/index.d.ts
Expand Up @@ -10,5 +10,5 @@ export namespace AST {
export function traverseNodes(node: VAST.ASTNode, visitor: Visitor): void
export { getFallbackKeys }

export const NS: typeof VAST.NS
export const NS: VAST.NS
}

0 comments on commit 204cca9

Please sign in to comment.