UNPKG

2.46 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 * This code may only be used under the BSD style license found at
5 * http://polymer.github.io/LICENSE.txt
6 * The complete set of authors may be found at
7 * http://polymer.github.io/AUTHORS.txt
8 * The complete set of contributors may be found at
9 * http://polymer.github.io/CONTRIBUTORS.txt
10 * Code distributed by Google as part of the polymer project is also
11 * subject to an additional IP rights grant found at
12 * http://polymer.github.io/PATENTS.txt
13 */
14import { NodePath } from '@babel/traverse';
15import * as babel from '@babel/types';
16import { PrototypeMemberFinder } from '../javascript/class-scanner';
17import { Visitor } from '../javascript/estree-visitor';
18import { JavaScriptDocument } from '../javascript/javascript-document';
19import * as jsdoc from '../javascript/jsdoc';
20import { Warning } from '../model/model';
21import { ScannedPolymerElementMixin } from './polymer-element-mixin';
22export declare class MixinVisitor implements Visitor {
23 mixins: ScannedPolymerElementMixin[];
24 private _document;
25 private _currentMixin;
26 private _currentMixinNode;
27 private _currentMixinFunction;
28 private _prototypeMemberFinder;
29 readonly warnings: Warning[];
30 constructor(document: JavaScriptDocument, prototypeMemberFinder: PrototypeMemberFinder);
31 enterAssignmentExpression(node: babel.AssignmentExpression, _parent: babel.Node, path: NodePath): void;
32 enterFunctionDeclaration(node: babel.FunctionDeclaration, _parent: babel.Node, path: NodePath): void;
33 leaveFunctionDeclaration(node: babel.FunctionDeclaration, _parent: babel.Node): void;
34 enterVariableDeclaration(node: babel.VariableDeclaration, _parent: babel.Node, path: NodePath): void;
35 leaveVariableDeclaration(node: babel.VariableDeclaration, _parent: babel.Node): void;
36 private tryInitializeMixin;
37 private clearOnLeave;
38 enterFunctionExpression(node: babel.FunctionExpression, _parent: babel.Node): void;
39 enterArrowFunctionExpression(node: babel.ArrowFunctionExpression, _parent: babel.Node): void;
40 enterClassExpression(node: babel.ClassExpression, parent: babel.Node): void;
41 enterClassDeclaration(node: babel.ClassDeclaration, _parent: babel.Node): void;
42 private _handleClass;
43}
44export declare function hasMixinFunctionDocTag(docs: jsdoc.Annotation): boolean;
45export declare function hasMixinClassDocTag(docs: jsdoc.Annotation): boolean;