Skip to content

Declare the missing options in the AlaSQLOptions type - #3085

Open
zzoraemon043 wants to merge 1 commit into
AlaSQL:developfrom
zzoraemon043:types-missing-options
Open

zzoraemon043 wants to merge 1 commit into
AlaSQL:developfrom
zzoraemon043:types-missing-options

Conversation

@zzoraemon043

Copy link
Copy Markdown
Contributor

alasql.options has six options that AlaSQLOptions in types/alasql.d.ts does not declare, so TypeScript rejects code that sets them:

alasql.options.dateAsString = false;
// error TS2339: Property 'dateAsString' does not exist on type 'AlaSQLOptions'.

The same goes for csvStringToNumber, joinstar, loopbreak, maxCteIterations and progress. All six are in the defaults in src/17alasql.js and read by the engine.

Types added:

Only the declaration file changes. Checked with tsc --strict on a file that sets each option: 8 errors before, none after, and @ts-expect-error still catches joinstar = 'dots' and dateAsString = 'no'. yarn test-only after build.sh: 2657 pass, and the same 9 tests fail before and after (Test 107-B Excel files and two CLI pipe tests, on Windows).

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.

1 participant