'Is it possible to use string literal types in AssemblyScript?

Is it possible to create a string literal type in AssemblyScript that resembles the type keyword used in TypeScript?

TypeScript example:

export type MyType = 'foo' | 'bar';


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source