Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
fuma-nama committed Jan 30, 2024
1 parent 8643903 commit dfa2069
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions packages/core/src/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ function getProgram(options: Options['options'] = {}): ts.Program {
},
});

console.log(program.getConfigFileParsingDiagnostics());

cache.set(key, program);

return program;
Expand Down Expand Up @@ -110,30 +108,7 @@ export function generateDocumentation(options: Options): DocEntry[] {
symbol,
};

const allDiagnostics = ts.getPreEmitDiagnostics(program);

allDiagnostics.forEach((diagnostic) => {
if (diagnostic.file && diagnostic.start) {
const { line, character } = ts.getLineAndCharacterOfPosition(
diagnostic.file,
diagnostic.start,
);
const message = ts.flattenDiagnosticMessageText(
diagnostic.messageText,
'\n',
);

console.log(
`${diagnostic.file.fileName} (${line + 1},${
character + 1
}): ${message}`,
);
} else {
console.log(
ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'),
);
}
});
console.log(type);

Check failure on line 111 in packages/core/src/typescript.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement

return type.getProperties().map(getDocEntry.bind(entryContext));
}
Expand Down

0 comments on commit dfa2069

Please sign in to comment.