-
-
Save dansteren/9eb3244101a2bd799a5a79669123249a to your computer and use it in GitHub Desktop.
Azle Type Alias Traversal Test Case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {nat32, Record} from 'azle' | |
// export type nat32 = number; | |
type One = string; | |
type Two = nat32; | |
type Three = One; | |
type Four = BigBoyClass | |
type Five = MyRecord | |
type Six = Four | |
type MyRecord = Record<{}> | |
class BigBoyClass {} | |
type SomeRecord = Record<{}> // As an inline type instead of a record | |
// What to pass to Framework | |
types = { | |
type_alias: [ | |
One => Primitive(string), | |
Two => Primitive(nat32), | |
Three => TypeRef(One), | |
// Four => TypeRef(BigBoyClass) | |
Six => TypeRef(Four) | |
Five => TypeRef(MyRecord), | |
SomeRecord => Record(...) | |
] | |
records: [ | |
MyRecord => Record | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment