Expand description
Shared ECMAScript (JavaScript/TypeScript) support functions.
This module contains common logic shared between JavaScript, TypeScript, and TSX. Each language struct delegates to these functions for DRY implementation.
Constants§
- COMPLEXITY_
NODES - CONTROL_
FLOW_ KINDS - IMPORT_
KINDS - JS_
CONTAINER_ KINDS - JS_
EXTENSIONS - JS_
FUNCTION_ KINDS - JS_
TYPE_ KINDS - NESTING_
NODES - PUBLIC_
SYMBOL_ KINDS - SCOPE_
CREATING_ KINDS - TS_
CONTAINER_ KINDS - TS_
EXTENSIONS - TS_
FUNCTION_ KINDS - TS_
TYPE_ KINDS
Functions§
- extract_
container - Extract a class or interface container symbol from a node.
- extract_
function - Extract a function/method symbol from a node.
- extract_
imports - Extract imports from an import_statement node.
- extract_
public_ symbols - Extract exports from an export_statement node.
- extract_
type - Extract a TypeScript type symbol (interface, type alias, enum).
- find_
deno_ cache - Find Deno cache directory.
- find_
node_ modules - Find node_modules directory by walking up from a file.
- find_
package_ cache - Find the node_modules directory.
- find_
package_ entry - Find entry point for a JavaScript/TypeScript package. Checks package.json for module/main fields, falls back to index.{js,mjs,cjs,ts}.
- format_
import - Format an import as JavaScript/TypeScript source code.
- get_
deno_ version - Get Deno version.
- get_
node_ version - Get Node.js version (for index versioning).
- get_
version - Get the Node.js version.
- resolve_
deno_ import - Resolve a Deno URL import to its cached location.
- resolve_
external_ import - Resolve an external (node_modules) import.
- resolve_
local_ import - Resolve a relative import to a local file path.