Skip to content

hooks

Documentation / @wtf/project-resolve / hooks

The resolve hooks ./register registers, as functions of Node’s registerHooks:

  • sourcesHookOf: an import of a package of the workspace resolves to its TypeScript, by its @wtf/source condition, SOURCE_CONDITION of ./condition (sourcesOf);
  • resolveTypeScript: a relative import of a project’s own module that Node finds no file for resolves to the TypeScript beside it, ./x.js to ./x.ts, and ./x to ./x.ts or ./x/index.ts.

Every other import resolves as Node resolves it; and each module sourcesHookOf resolves, at the real path of its file.

Variables

Functions