Closed iccir closed 5 years ago
Right now, we only support protocols on the id type:
oj type id<Foo> becomes ts type $oj_p_Foo. oj type TheClass<Foo> is not parseable.
id<Foo>
$oj_p_Foo
TheClass<Foo>
Instead, we should use union types:
oj type TheClass<Foo> becomes ts type $oj_c_TheClass & $oj_p_Foo oj type TheClass<Foo, Bar> becomes ts type $oj_c_TheClass & $oj_p_Foo & oj_p_Bar
$oj_c_TheClass & $oj_p_Foo
TheClass<Foo, Bar>
$oj_c_TheClass & $oj_p_Foo & oj_p_Bar
This is no longer applicable in 3.0, as id<Foo> is now simply Foo.
Foo
Right now, we only support protocols on the id type:
oj type
id<Foo>
becomes ts type$oj_p_Foo
. oj typeTheClass<Foo>
is not parseable.Instead, we should use union types:
oj type
TheClass<Foo>
becomes ts type$oj_c_TheClass & $oj_p_Foo
oj typeTheClass<Foo, Bar>
becomes ts type$oj_c_TheClass & $oj_p_Foo & oj_p_Bar