Class RecordTypeBuilder
java.lang.Object
com.google.javascript.rhino.jstype.RecordTypeBuilder
A builder for record types.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddProperty
(String name, JSType type, Node propertyNode) Adds a property with the given name and type to the record type.build()
Creates a record.
-
Constructor Details
-
RecordTypeBuilder
-
-
Method Details
-
addProperty
Adds a property with the given name and type to the record type.- Parameters:
name
- the name of the new propertytype
- the JSType of the new propertypropertyNode
- the node that holds this property definition- Returns:
- The builder itself for chaining purposes, or null if there's a duplicate.
-
build
Creates a record.- Returns:
- The record type.
-