Skip to content

feat: better min/max return type#2955

Merged
josdejong merged 1 commit into
josdejong:developfrom
Maxim-Mazurok:2954-fix
May 22, 2023
Merged

feat: better min/max return type#2955
josdejong merged 1 commit into
josdejong:developfrom
Maxim-Mazurok:2954-fix

Conversation

@Maxim-Mazurok
Copy link
Copy Markdown
Contributor

Addresses #2954
Tests included
And a small typo fix

Couldn't fully run TS tests on local:

> mathjs@11.8.0 test:types
> tsc -p ./tsconfig.json && node --loader ts-node/esm ./test/typescript-tests/testTypes.ts

(node:64308) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
/Users/max/mathjs/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:366
    throw new ERR_MODULE_NOT_FOUND(
          ^
CustomError: Cannot find module '/Users/max/mathjs/lib/esm/index.js' imported from /Users/max/mathjs/test/typescript-tests/testTypes.ts
    at finalizeResolution (/Users/max/mathjs/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:366:11)
    at moduleResolve (/Users/max/mathjs/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:801:10)
    at Object.defaultResolve (/Users/max/mathjs/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:912:11)
    at /Users/max/mathjs/node_modules/ts-node/src/esm.ts:218:35
    at entrypointFallback (/Users/max/mathjs/node_modules/ts-node/src/esm.ts:168:34)
    at /Users/max/mathjs/node_modules/ts-node/src/esm.ts:217:14
    at addShortCircuitFlag (/Users/max/mathjs/node_modules/ts-node/src/esm.ts:409:21)
    at resolve (/Users/max/mathjs/node_modules/ts-node/src/esm.ts:197:12)
    at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)

But it compiles fine, TSC doesn't complain, hopefully, CI will have more luck with it.

@josdejong
Copy link
Copy Markdown
Owner

Thanks Maxim!

Couldn't fully run TS tests on local

Sorry, that requires a one-time npm run build to run properly. I think that is not described anywhere.

@josdejong josdejong merged commit 5b53fff into josdejong:develop May 22, 2023
@Maxim-Mazurok Maxim-Mazurok deleted the 2954-fix branch June 4, 2023 00:48
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.

2 participants