Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.rhino |
The core AST from Rhino.
|
Modifier and Type | Method and Description |
---|---|
static Node.TypeDeclarationNode |
JsdocToEs6TypedConverter.TypeDeclarationsIRFactory.convert(JSTypeExpression typeExpr) |
static Node.TypeDeclarationNode |
JsdocToEs6TypedConverter.TypeDeclarationsIRFactory.convertTypeNodeAST(Node n)
The root of a JSTypeExpression is very different from an AST node, even
though we use the same Java class to represent them.
|
Modifier and Type | Method and Description |
---|---|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.anyType()
Equivalent to the UNKNOWN type in Closure, expressed with
{?} |
static Node.TypeDeclarationNode |
TypeDeclarationsIR.arrayType(Node elementType)
Represents an array type.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.booleanType() |
Node.TypeDeclarationNode |
Node.TypeDeclarationNode.cloneNode() |
static Node.TypeDeclarationNode |
TypeDeclarationsIR.functionType(Node returnType,
LinkedHashMap<String,Node.TypeDeclarationNode> requiredParams,
LinkedHashMap<String,Node.TypeDeclarationNode> optionalParams,
String restName,
Node.TypeDeclarationNode restType)
Represents a function type.
|
Node.TypeDeclarationNode |
Node.getDeclaredTypeExpression()
Returns the syntactical type specified on this node.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.namedType(Iterable<String> segments)
Produces a tree structure similar to the Rhino AST of a qualified name
expression, under a top-level NAMED_TYPE node.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.namedType(String typeName)
Splits a '.' separated qualified name into a tree of type segments.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.numberType() |
static Node.TypeDeclarationNode |
TypeDeclarationsIR.optionalParameter(Node.TypeDeclarationNode parameterType)
Represents a function parameter that is optional.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.parameterizedType(Node.TypeDeclarationNode baseType,
Iterable<Node.TypeDeclarationNode> typeParameters)
Represents a parameterized, or generic, type.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.recordType(LinkedHashMap<String,Node.TypeDeclarationNode> properties)
Represents a structural type.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.stringType() |
static Node.TypeDeclarationNode |
TypeDeclarationsIR.undefinedType() |
static Node.TypeDeclarationNode |
TypeDeclarationsIR.unionType(Iterable<Node.TypeDeclarationNode> options)
Represents a union type, which can be one of the given types.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.unionType(Node.TypeDeclarationNode... options) |
static Node.TypeDeclarationNode |
TypeDeclarationsIR.voidType() |
Modifier and Type | Method and Description |
---|---|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.functionType(Node returnType,
LinkedHashMap<String,Node.TypeDeclarationNode> requiredParams,
LinkedHashMap<String,Node.TypeDeclarationNode> optionalParams,
String restName,
Node.TypeDeclarationNode restType)
Represents a function type.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.optionalParameter(Node.TypeDeclarationNode parameterType)
Represents a function parameter that is optional.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.parameterizedType(Node.TypeDeclarationNode baseType,
Iterable<Node.TypeDeclarationNode> typeParameters)
Represents a parameterized, or generic, type.
|
void |
Node.setDeclaredTypeExpression(Node.TypeDeclarationNode typeExpression)
Sets the syntactical type specified on this node.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.unionType(Node.TypeDeclarationNode... options) |
Modifier and Type | Method and Description |
---|---|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.functionType(Node returnType,
LinkedHashMap<String,Node.TypeDeclarationNode> requiredParams,
LinkedHashMap<String,Node.TypeDeclarationNode> optionalParams,
String restName,
Node.TypeDeclarationNode restType)
Represents a function type.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.functionType(Node returnType,
LinkedHashMap<String,Node.TypeDeclarationNode> requiredParams,
LinkedHashMap<String,Node.TypeDeclarationNode> optionalParams,
String restName,
Node.TypeDeclarationNode restType)
Represents a function type.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.parameterizedType(Node.TypeDeclarationNode baseType,
Iterable<Node.TypeDeclarationNode> typeParameters)
Represents a parameterized, or generic, type.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.recordType(LinkedHashMap<String,Node.TypeDeclarationNode> properties)
Represents a structural type.
|
static Node.TypeDeclarationNode |
TypeDeclarationsIR.unionType(Iterable<Node.TypeDeclarationNode> options)
Represents a union type, which can be one of the given types.
|
Copyright © 2009–2023 Google. All rights reserved.