'use strict'; /** * Syntax types for generic types. * @enum {string} */ const GenericTypeSyntax = { /** * From TypeScript and Closure Library. * Example: {@code Array} */ ANGLE_BRACKET: 'ANGLE_BRACKET', /** * From JSDoc and Legacy Closure Library. * Example: {@code Array.} */ ANGLE_BRACKET_WITH_DOT: 'ANGLE_BRACKET_WITH_DOT', /** * From JSDoc. * Example: {@code String[]} */ SQUARE_BRACKET: 'SQUARE_BRACKET', }; const VariadicTypeSyntax = { /** * From Closure Library. * Example: {@code ...Type} */ PREFIX_DOTS: 'PREFIX_DOTS', /** * From JSDuck. * Example: {@code Type...} */ SUFFIX_DOTS: 'SUFFIX_DOTS', /** * From Closure Library. * Example: {@code ...} */ ONLY_DOTS: 'ONLY_DOTS', }; const OptionalTypeSyntax = { PREFIX_EQUALS_SIGN: 'PREFIX_EQUALS_SIGN', SUFFIX_EQUALS_SIGN: 'SUFFIX_EQUALS_SIGN', SUFFIX_KEY_QUESTION_MARK: 'SUFFIX_KEY_QUESTION_MARK', }; const NullableTypeSyntax = { PREFIX_QUESTION_MARK: 'PREFIX_QUESTION_MARK', SUFFIX_QUESTION_MARK: 'SUFFIX_QUESTION_MARK', }; const NotNullableTypeSyntax = { PREFIX_BANG: 'PREFIX_BANG', SUFFIX_BANG: 'SUFFIX_BANG', }; module.exports = { GenericTypeSyntax, VariadicTypeSyntax, OptionalTypeSyntax, NullableTypeSyntax, NotNullableTypeSyntax, };