dao-xyz / borsh-ts

⚡️fast TypeScript implementation of Borsh serialization format
Apache License 2.0
37 stars 3 forks source link

feat: type alias for field #22

Closed hanakannzashi closed 1 year ago

hanakannzashi commented 1 year ago

Decorator name field maybe not specific enough, I think we can add a type alias for field named borsh that specifically refers to borsh serialization

marcus-pousette commented 1 year ago

Thanks for the PR

The reason why I the decorator is named field is because we also have another one called variant. In the future there might be a wildcard one, like auto. the decorator name should describe its purpose.borsh, might indicate the origin of the decorator, but not its purpose.

What if you would just do a named import ?

import { field as borsh } from '@dao-xyz/borsh'