Skip to content

PreviewUpdateService.isKnownFile ​

How to read this API

These are TypeScript APIs compiled into SnapTeX; a .tex project cannot load them at runtime.

  • function name(...) is a helper that your rule imports and calls.
  • apply(...), render(...), extract(...), and collect(...) are callbacks that your rule implements and SnapTeX calls.
  • renderer.name(...), context.name(...), input.name(...), and deps.name(...) are methods SnapTeX supplies to callbacks; do not import or construct them.
  • service.name(...) is an instance method called after your host or test constructs PreviewUpdateService.

Register extension declarations through SNAP_TEX_RULES in src/rules.ts. See Source API Scope for imports, value ownership, output safety, rebuilds, and testing.

Checks whether a URI belongs to the current parsed project.

Signature ​

ts
service.isKnownFile(uri: string): boolean

Returns ​

true when the normalized URI matches the current root directory or an entry in the document file pool.

Call relationships ​

  • Delegates to: SmartRenderer.isKnownFile.
  • Reads: state established by the latest render.
  • Called by: hosts filtering editor/file events for the active preview project.

See also ​

A fast structural preview, not a replacement for a full TeX compiler.