Skip to content

intermediate typedef #55

@francescoagati

Description

@francescoagati

hi,
in a case like this can be possible have the typedef intermedie generated for the json definition?

enum A {
	A1(b:B);
}

enum B {
	B1(c:C);
}

enum C {
	C1(s:String);
}

typedef X = {
	a:A
}

 class Main {


	static function main() {
		var x:X = {
			a: A1(B1(C1("test")))
		};
		var s = tink.Json.stringify(x);
		trace(s);
		var x2:X = tink.Json.parse(s);
		var rt = switch (x2.a) {
			case A1(B1(C1(s))): s;
		};
		trace(rt);
	}
}


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions