Class: CustomElementsManifestParser::DataTypes::Reference

Inherits:
BaseStruct
  • Object
show all
Defined in:
lib/custom_elements_manifest_parser/data_types/reference.rb

Overview

A reference to an export of a module.

All references are required to be publically accessible, so the canonical representation of a reference is the export it's available from.

package should generally refer to an npm package name. If package is undefined then the reference is local to this package. If module is undefined the reference is local to the containing module.

References to global symbols like Array, HTMLElement, or Event should use a package name of "global:".

Direct Known Subclasses

TypeReference

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#moduleString?

Returns:

  • (String, nil)


29
# File 'lib/custom_elements_manifest_parser/data_types/reference.rb', line 29

attribute :module, Types::Strict::String.optional.meta(required: false)

#nameString

Returns - Name of the reference.

Returns:

  • (String)
    • Name of the reference


21
# File 'lib/custom_elements_manifest_parser/data_types/reference.rb', line 21

attribute :name, Types::Strict::String

#packageString?

Returns - Name of the package.

Returns:

  • (String, nil)
    • Name of the package


25
# File 'lib/custom_elements_manifest_parser/data_types/reference.rb', line 25

attribute :package, Types::Strict::String.optional.meta(required: false)

Instance Method Details

#visit(parser:) ⇒ Object



31
32
33
# File 'lib/custom_elements_manifest_parser/data_types/reference.rb', line 31

def visit(parser:)
  self
end