{"id":19986170,"url":"https://github.com/fuse-box/fuse-box-typechecker","last_synced_at":"2025-08-21T15:19:25.623Z","repository":{"id":18225935,"uuid":"83840789","full_name":"fuse-box/fuse-box-typechecker","owner":"fuse-box","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-06T01:41:02.000Z","size":1216,"stargazers_count":31,"open_issues_count":15,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-24T13:10:28.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fuse-box.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-03T20:59:12.000Z","updated_at":"2023-08-25T11:25:53.000Z","dependencies_parsed_at":"2023-01-13T19:43:32.462Z","dependency_job_id":null,"html_url":"https://github.com/fuse-box/fuse-box-typechecker","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuse-box%2Ffuse-box-typechecker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuse-box%2Ffuse-box-typechecker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuse-box%2Ffuse-box-typechecker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuse-box%2Ffuse-box-typechecker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fuse-box","download_url":"https://codeload.github.com/fuse-box/fuse-box-typechecker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224389542,"owners_count":17303296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T04:28:13.355Z","updated_at":"2024-11-13T04:28:13.967Z","avatar_url":"https://github.com/fuse-box.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"##### NB! This is readme for 3.0.0 - vNext version\nSee [here for v2 docs](https://github.com/fuse-box/fuse-box-typechecker/tree/dee2380a88b66704299b1c2e3345d935ca21f651)\n\n# fuse-box-typechecker 3.0.0\nSimple helper to do typechecking\nYou need to install newest typescript to use this.\n\n```npm install fuse-box-typechecker```\n\n\n### Output sample with all options enabled\n![Output sample](https://github.com/fuse-box/fuse-box-typechecker/raw/master/image/sampleNew8.png \"Output sample\")\n\n\n\n---\n\n## How to load and configure\n\n#### As plugin for fusebox v4\n```js\nimport {pluginTypeChecker} from 'fuse-box-typechecker';\n\n\n//under plugins\n    plugins:[pluginTypeChecker({\n        tsConfig: './src/tsconfig', // optional, uses fusebox tsconfig if else\n        name: 'Superman' // optional, uses \"no-name\" if missing\n    })]\n\n```\n\n#### As Standalone\n\n\n```js\n// get typechecker, se under options for more info\nconst typeChecker = require('fuse-box-typechecker').TypeChecker({\n    tsConfig: './tsconfig.json',\n    basePath: './',\n    name: 'checkerSync'\n});\n\n\n// to run it right away\ntypeChecker.printSettings();\ntypeChecker.inspectAndPrint();\n\n// or just run watch, it will now run in own tread and wait for changes\ntypeChecker.worker_watch('./src');\n\n\n// see public functions for more ways to use it\n\n\n\n```\n\nEmiting code\n\n```js\nconst checker = require('fuse-box-type-checker').TypeChecker({\n    tsConfig: './tsconfig.json',\n    tsConfigOverride:{\n        \"compilerOptions\": {\n            \"outDir\": \"testme/\"\n        }\n    },\n    basePath: './',\n    name: 'checkerEmit'\n});\nchecker.printSettings(); // optional\nlet result = checker.inspectOnly();\nchecker.printOnly(result); // optional...\nresult.oldProgram.emit();\n```\n\n\n---\n\n#### Public functions\n\n```ts\nprintSettings(): void;\ninspectAndPrint(): number;\ninspectOnly(oldProgram: ts.EmitAndSemanticDiagnosticsBuilderProgram): IResults;\nprintOnly(errors: IResults): number;\nworker_watch(pathToWatch: string): void;\nworker_kill(): void;\nworker_inspect(): void;\nworker_PrintSettings(): void;\nworker_print(): void;\nworker_inspectAndPrint(): void;\n\n```\n\n\n#### Options/interface info\n\n```typescript\n\n\n// options\ninterface ITypeCheckerOptionsInterface {\n    //config file (compared to basepath './tsconfig.json')\n    tsConfig: string; \n\n    \n    // override tsconfig settings, does not override entire compilerOptions object, only parts you set\n    tsConfigOverride: Object \n       \n    \n    // base path to use\n    basePath: string; \n    \n    \n    // name, will be displayed when it runs, useful when you have more then 1 checker\n    name?: string; \n\n    // throw options\n    throwOnSyntactic?: boolean;\n    throwOnSemantic?: boolean;\n    throwOnGlobal?: boolean;\n    throwOnOptions?: boolean;  \n    \n    // use shortened filenames in order to make output less noisy\n    shortenFilenames?: boolean; \n    \n    // skip ts errors\n    skipTsErrors?: number[];\n\n    // print settings\n    print_summary?: boolean; //default false\n    print_runtime?: boolean //default false\n    printFirstRun?: boolean //default false  /plugin only\n    \n}\n\n// result from inspect code, u need this to run print\nexport interface IResults {\n    oldProgram: ts.EmitAndSemanticDiagnosticsBuilderProgram;\n    optionsErrors: ts.Diagnostic[];\n    globalErrors: ts.Diagnostic[];\n    syntacticErrors: ts.Diagnostic[];\n    semanticErrors: ts.Diagnostic[];\n    elapsedInspectionTime: number;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuse-box%2Ffuse-box-typechecker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuse-box%2Ffuse-box-typechecker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuse-box%2Ffuse-box-typechecker/lists"}