Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/recipes-react-components/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"declaration": true,
Comment thread
Hotell marked this conversation as resolved.
Comment thread
Hotell marked this conversation as resolved.
Comment thread
Hotell marked this conversation as resolved.
"inlineSources": true
},
"exclude": [],
"include": ["./src/**/*.ts", "./src/**/*.tsx"]
}
19 changes: 12 additions & 7 deletions scripts/tasks/src/type-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { exec } from 'just-scripts-utils';

import { type TsConfig, getTsPathAliasesConfig } from './utils';

export async function typeCheck() {
export function typeCheck(): Promise<void> | undefined {
const { isUsingTsSolutionConfigs, tsConfigs } = getTsPathAliasesConfig();

if (!isUsingTsSolutionConfigs) {
Expand All @@ -20,17 +20,22 @@ export async function typeCheck() {

const tsConfigsRefs = getTsConfigs(config, { spec: false, e2e: false });

const asyncQueue = [];
const asyncQueue: Array<ReturnType<typeof exec>> = [];

for (const ref of tsConfigsRefs) {
const program = `tsc -p ${ref} --pretty --baseUrl .`;
const program = `tsc -p ${ref} --pretty --baseUrl . --noEmit`;
asyncQueue.push(exec(program));
}

return Promise.all(asyncQueue).catch(err => {
console.error(err.stdout);
process.exit(1);
});
return Promise.all(asyncQueue)
.then(_ => {
logger.info('Type checking completed successfully');
return;
})
.catch(err => {
console.error(err.stdout);
process.exit(1);
});
}

function getTsConfigs(solutionConfig: TsConfig, exclude: { spec: boolean; e2e: boolean }) {
Expand Down