(
filePath: string,
source: string,
language?: Language,
options?: { sourceIsPreParsed?: boolean; sourceAsWritten?: string }
)
| 977 | private reExportsAsWritten: boolean | null = null; |
| 978 | |
| 979 | constructor( |
| 980 | filePath: string, |
| 981 | source: string, |
| 982 | language?: Language, |
| 983 | options?: { sourceIsPreParsed?: boolean; sourceAsWritten?: string } |
| 984 | ) { |
| 985 | this.filePath = filePath; |
| 986 | this.source = source; |
| 987 | this.language = language || detectLanguage(filePath, source); |
| 988 | this.extractor = EXTRACTORS[this.language] || null; |
| 989 | this.fnRefSpec = FN_REF_SPECS[this.language]; |
| 990 | this.sourceIsPreParsed = options?.sourceIsPreParsed === true; |
| 991 | if (options?.sourceAsWritten !== undefined && options.sourceAsWritten !== source) { |
| 992 | this.sourceAsWritten = options.sourceAsWritten; |
| 993 | } |
| 994 | } |
| 995 | |
| 996 | /** The text `getSignature` reads: the source as written when the extractor asks for it. */ |
| 997 | private get signatureSource(): string { |
nothing calls this directly
no test coverage detected