Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for generic types #78

Open
cruperman opened this issue Feb 27, 2018 · 3 comments
Open

add support for generic types #78

cruperman opened this issue Feb 27, 2018 · 3 comments

Comments

@cruperman
Copy link

export class A<T> {
   @serializable(alias('foo', object(???))
   public Foo: T;
}
@alexggordon
Copy link
Member

Does the raw type handle this?

@JustAnotherSoftwareDeveloper

I would say that it doesn't. The raw type, the way I read it, would only work if T were an interface. If T were an object with methods associated with it, then the raw type would be insufficient.

@1R053
Copy link
Collaborator

1R053 commented Jan 23, 2019

you can perform any logic that is not possible with the standard types using the custom type and applying your own methods for serialization and deserialization, the latter can also be performed asynchronously.

see e.g. this test case:

class FinalData {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants