versions

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRegistry = NewRegistry()

DefaultRegistry is the default instance of the typescript tagged version registry.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry is a thread-safe registry for storing tagged versions of the typescript source code.

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new instances of a version registry

func (*Registry) Get

func (r *Registry) Get(tag string) (*goja.Program, error)

Get attempts to return the typescript source for the specified tag if it exists, otherwise it returns an error with a list of typescript versions that are supported by this registry.

func (*Registry) MustGet

func (r *Registry) MustGet(tag string) *goja.Program

MustGet calls Get with the specified tag, but panics if the tag cannot be found.

func (*Registry) MustRegister

func (r *Registry) MustRegister(tag string, source string)

MustRegister calls Register and panics if we're unable to register the version.

func (*Registry) Register

func (r *Registry) Register(tag string, source string) error

Register registers the provided source to the specified tag in the registry.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL