Error: node_modules/mathlive/dist/public/core-types.d.ts:2:33 - error TS2307: Cannot find module '../core-definitions/definitions-utils' or its corresponding type declarations.
2 import { TokenDefinition } from '../core-definitions/definitions-utils';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/mathlive/dist/public/mathfield-element.d.ts:7:31 - error TS2307: Cannot find module '@cortex-js/compute-engine' or its corresponding type declarations.
7 import { ComputeEngine } from '@cortex-js/compute-engine';
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/mathlive/dist/public/mathfield.d.ts:2:39 - error TS2307: Cannot find module 'public/core-types' or its corresponding type declarations.
2 import type { ParseMode, Style } from 'public/core-types';
~~~~~~~~~~~~~~~~~~~
Error: node_modules/mathlive/dist/public/virtual-keyboard.d.ts:2:26 - error TS2307: Cannot find module 'public/commands' or its corresponding type declarations.
2 import { Selector } from 'public/commands';
~~~~~~~~~~~~~~~~~
Error: node_modules/mathlive/dist/public/virtual-keyboard.d.ts:3:33 - error TS2307: Cannot find module 'public/options' or its corresponding type declarations.
3 import { OriginValidator } from 'public/options';
~~~~~~~~~~~~~~~~
I’ve included a fix that should work with #1912. Changed the triple slash references to
types
instead ofpath
. Seems to be consistent use of the custom.d.ts
file according to the typescript docs. Also, added a line to the build script to manually copy thecortex-compute-engine.d.ts
file to the dist folder. Also, bumped @types/css-font-loading-module to latest version to address some additional typescript errors that were coming up in the test.Sorry about that.
The MathLive test harness did not include using Typescript from the published public declaration files, resulting in those errors coming up.
I have now added some test cases to detect those problems, and this should prevent their occurrence in the future.