Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

ENUM Value

node v6.17.1
version: 1.0.0
endpointsharetweet
const jkt = require('jkt') const Colors = jkt.ENUM` RED: Maroon WHITE BLUE: ${'just blue'} ` const TSize = jkt.ENUM`small, medium, large, extra_large: ${'EXTRA-LARGE'}` const TShirt = jkt` model: String brand: Number! color: ${Colors} size: ${TSize} ` // Calling enum directly console.log(Colors()) console.log(TSize()) // Callling enum from struct console.log(TShirt.E.COLOR.RED)
Loading…

no comments

    sign in to comment