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 | */
|
14 | import * as babel from '@babel/types';
|
15 | import { LiteralValue } from '../model/model';
|
16 | import * as jsdoc from './jsdoc';
|
17 | /**
|
18 | * Tries to get the value of an expression. Returns undefined on failure.
|
19 | */
|
20 | export declare function expressionToValue(valueExpression: babel.Node): LiteralValue;
|
21 | /**
|
22 | * Extracts the name of the identifier or `.` separated chain of identifiers.
|
23 | *
|
24 | * Returns undefined if the given node isn't a simple identifier or chain of
|
25 | * simple identifiers.
|
26 | */
|
27 | export declare function getIdentifierName(node: babel.Node): string | undefined;
|
28 | /**
|
29 | * Formats the given identifier name under a namespace, if one is mentioned in
|
30 | * the commentedNode's comment. Otherwise, name is returned.
|
31 | */
|
32 | export declare function getNamespacedIdentifier(name: string, docs?: jsdoc.Annotation): string;
|
33 | export declare const CANT_CONVERT = "UNKNOWN";
|