lib/extractor
lib/extractor.js
Functions(21)
Signature
getScriptKind(file: any): any
Signature
modifiersOf(node: any): any
Signature
typeText(node: any): any
Signature
hasReturnWithValue(block: any): any
Signature
inferReturnType(fnNode: any): any
Signature
inferTypeFromInitializer(init: any): any
Signature
extractParams(params: any): any
Signature
getLineNumber(sourceFile: any, node: any): any
Parse a raw /** ... *\/ comment block.
Returns: { description, example, since, deprecated, params, returns, throws }
- description: text before the first @tag line
- example: text after @example
- since: string after @since
- deprecated: message after @deprecated (or empty string if bare tag)
- params: [{ name, type, description }] from @param {type} name desc
- returns: { type, description } from @returns {type} desc
- throws: [{ type, description }] from @throws {type} desc
| Parameter | Type | Optional | Description |
|---|---|---|---|
raw | any |
Returns:
any Signature
parseJSDocBlock(raw: any): any
Signature
extractBraced(str: any): any
Heuristic: does a raw leading comment look like it was intended as a
JSDoc block but is malformed (wrong asterisk count) while still carrying
an @tag inside? Used by lib/lint.js's no-bad-blocks rule. Deterministic,
no fuzzy/AI scoring — a fixed structural check.
| Parameter | Type | Optional | Description |
|---|---|---|---|
text | any |
Returns:
any Signature
looksLikeIntendedJSDoc(text: any): any
Read the nearest leading /** ... *\/ block for a node.
Also surfaces rawComment (the exact block text, for lib/lint.js's
text-level rules) and badComment (a near-miss malformed block, if no
proper /** block was found — see looksLikeIntendedJSDoc above).
| Parameter | Type | Optional | Description |
|---|---|---|---|
sourceFile | any | ||
node | any |
Returns:
any Signature
readJSDoc(sourceFile: any, node: any): any
Extract top-of-file /** @module ... *\/ block.
Returns { moduleName, description, since } or all-null.
| Parameter | Type | Optional | Description |
|---|---|---|---|
sourceFile | any |
Returns:
any Signature
extractModuleDoc(sourceFile: any): any
| Parameter | Type | Optional | Description |
|---|---|---|---|
node | any | ||
sourceFile | any | ||
nameOverride | any |
Returns:
any Signature
extractFunction(node: any, sourceFile: any, nameOverride: any): any
Signature
extractClass(node: any, sourceFile: any): any
Signature
extractInterface(node: any, sourceFile: any): any
Signature
extractTypeAlias(node: any, sourceFile: any): any
Signature
extractEnum(node: any, sourceFile: any): any
Signature
extractModule(filePath: any): any
Variables & Constants(68)
const { findFirstDescendant, asFunctionLike, asClass }: any
constSignature
const { findFirstDescendant, asFunctionLike, asClass }: anySignature
const { type, rest: nameAndDesc }: anySignature
const { type, rest: desc }: anySignature
const { type, rest: desc }: any