Skip to content

Instantly share code, notes, and snippets.

@dansteren
Created February 23, 2023 20:32
Show Gist options
  • Save dansteren/b7ecf40c31c80d450c831701705f7426 to your computer and use it in GitHub Desktop.
Save dansteren/b7ecf40c31c80d450c831701705f7426 to your computer and use it in GitHub Desktop.
Kybra type alias traversal test case
# Coming from kybra
float64 = float
primitiveList = list[string]
myList = list[myFloat]
badList = List[BigBoyClass]
Record = TypedDict
blob = bytes
version = "0.4.0" # Don't pass to CDK Framework
someVar = "badList" # Don't pass to CDK Framework
myFloat = float64
six = four
four = BigBoyClass
MyRecord = Record:
someProp: "BigBoyClass"
# What to pass to Framework:
types = {
type_aliases: [
# float64 => TypeRef(float),
primitiveList => Array(Primitive(string)),
myList => Array(TypeRef(myFloat)),
# Record => TypeRef(TypedDict),
# blob => TypeRef(bytes),
# don't pass version
myFloat => Primitive(float64),
# six => TypeRef(four),
# four => TypeRef(BigBoyClass),
]
records: [
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment