Skip to content

Added TypeScript support + improvement to generated files#56

Open
cervantes-x wants to merge 3 commits intoNielsLeenheer:mainfrom
cervantes-x:main
Open

Added TypeScript support + improvement to generated files#56
cervantes-x wants to merge 3 commits intoNielsLeenheer:mainfrom
cervantes-x:main

Conversation

@cervantes-x
Copy link

@cervantes-x cervantes-x commented May 17, 2025

Had to close my previous PR because of some issues.

This PR includes the following changes:

  • types for printers, codepage mappings and codepages are now generated on build
  • added "center" alignment for box and table

- removed center from table verticalAlign
@w3barsi
Copy link

w3barsi commented Jul 9, 2025

Could we maybe get an approval for this @NielsLeenheer?

@thisisbintang
Copy link

Can it be merged soon?

@hydrokat
Copy link

i am also waiting for this.

@Sawin3048
Copy link

Also waiting here

NielsLeenheer pushed a commit that referenced this pull request Mar 1, 2026
The implementation in LineComposer already handles center alignment
for embedded mode (tables/boxes), but the documentation only listed
left and right as valid options. Update docs to include center.

Extracted from PR #56.

https://claude.ai/code/session_01D7JHMJTJhD4TNqqhrwS3Qr
@NielsLeenheer
Copy link
Owner

Sorry this took so long.

The PR did help with making clear what the result should be, but I did have some issues with how we got to that result. Mostly with adding a separate type def file that needs to be kept in sync, the generated files containing data and not being integrated in the build system.

So I've now added .d.ts support in the main repository by generating only the allowed values, and letting tsc generate the .d.ts file itself from the js. That makes it a lot more manageable. Also added it upstream to the codepage encoder so we can import those values straight from there.

So the upcoming release will include property type definitions.

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 this pull request may close these issues.

7 participants