denosaurs / denosaurs/byte_type

Sugarcoat for constructing compound types

Open
#50 1 comment 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
TypeScript
Stars
45
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Copied from From #45

[NeKzor](https://github.com/NeKzor)
> I have another idea for declaring sized arrays. How about mapping a tuple to SizedArrayType/ArrayType or maybe even TypedArray?
Here is an example:
```ts
new Struct({
foo: [u8, 100], // length 100
});
```

[MierenManz](https://github.com/MierenManz)
> I've considered stuff like this in the past and eventho I really like how much cleaner it is compared to new SizedArrayType(u8, 100). I am conflicted if this magic is something we should want for the library.

[MierenManz](https://github.com/MierenManz)
> Maybe this is something we could do with decorators so that the magic spaghetti for it would be in a optional decorator somehow?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.