@verbund/types
TypeScript icon, indicating that this package has built-in type declarations

0.1.1-alpha.0 • Public • Published

@verbund/types

Package for creating and interacting with Verbund data types (ie: the AST and the View)

Installation

npm install @verbund/types

Creating a new Type

To create a new type, use the builder function which will return a new Type instance:

import * as t from '@verbund/types';

// Using the builder function
const literal = t.literal({
    value: 0
});
// or manually: new Literal({ value: 0 })

Checking an instance's type

import * as t from '@verbund/types';

const literal = t.literal({ value : 0 });

console.log(literal instanceof t.Literal); // true
console.log(literal instanceof t.Expression); // true
console.log(literal instanceof t.VerbundComponent); // false

Readme

Keywords

none

Package Sidebar

Install

npm i @verbund/types

Weekly Downloads

8

Version

0.1.1-alpha.0

License

MIT

Unpacked Size

142 kB

Total Files

51

Last publish

Collaborators

  • prevwong