Skip to content

Commit

Permalink
feat: add generic type to serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Jan 22, 2022
1 parent f352808 commit f124d61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Deserializer } from './lib/Deserializer';
import { OnUnsupported, Serializer } from './lib/Serializer';

export function serialize(data: any, onUnsupported?: OnUnsupported) {
export function serialize<T = unknown>(data: T, onUnsupported?: OnUnsupported) {
return new Serializer(data, onUnsupported).process();
}

Expand Down

0 comments on commit f124d61

Please sign in to comment.