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

RLE example does not work - 'bitWidth' does not exist in type 'FieldDefinition' #106

Closed
benjamin-brady opened this issue Jan 5, 2024 · 1 comment · Fixed by #107
Closed
Assignees

Comments

@benjamin-brady
Copy link

Steps to reproduce

  • Install parquetjs from npm
  • Try to compile the following code from the README:
import parquetjs from "@dsnp/parquetjs"
var schema1 = new parquetjs.ParquetSchema({
age: { type: 'UINT_32', encoding: 'RLE', bitWidth: 7 },
});

Expected behaviour

It should at least compile.

Actual behaviour

Error because there is no bitWidth property on the FieldDefinition type.

Object literal may only specify known properties, and 'bitWidth' does not exist in type 'FieldDefinition'.ts(2353)
declare.d.ts(14, 5): 
The expected type comes from this index signature.
(property) bitWidth: number
@wilwade wilwade self-assigned this Jan 5, 2024
@wilwade
Copy link
Member

wilwade commented Jan 5, 2024

@benjamin-brady Looks like there was an upstream doc issue.

tldr: Use typeLength instead of bitWidth

ironSource#100

I'll put up a PR to fix it with a simple test as well.

wilwade added a commit that referenced this issue Jan 9, 2024
Problem
=======
Docs were wrong from a long time ago per
ironSource#100

Solution
========
Updated the docs and added a simple test

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

Successfully merging a pull request may close this issue.

2 participants