arktypea
arktypeโ€ข3y ago
OnkelTem

The inferred type of '... cannot be named without a reference to '../../../../node_modules/arktype/

I receive this strange message:
src/clients/client-amazon.ts:76:3 - error TS2742: The inferred type of 'get' cannot be named without a reference to '../../../../node_modules/arktype/dist/types/scopes/type'. This is likely not portable. A type annotation is necessary.


What's weird is that I don't see it in VSCode when editing code, but only when attepmting to build the project.

Here is the code it's referrencing:

  get<K extends keyof Config>(name: K) {
    return config$$[name].assert(this.#config[name]);
  }


Here config$$ is a scope. How to properly type it?
Was this page helpful?