ts-checker-rspack-plugin 1.2.6 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -245,6 +245,21 @@ setting "generateTrace" compiler option. This is an instruction from [microsoft/
245
245
  6. Open `types.json` in an editor
246
246
  7. When you see a type ID in the tracing output, go-to-line {id} to find data about that type
247
247
 
248
+ ## Performance optimization
249
+
250
+ This plugin delegates type checking to TypeScript, so overall performance is mostly determined by `tsc` itself.
251
+
252
+ If you need faster type checks, start by optimizing your TypeScript setup using the [official TypeScript performance guide](https://github.com/microsoft/TypeScript/wiki/Performance).
253
+
254
+ For example, properly configuring the `include` and `exclude` scopes in `tsconfig.json` can significantly reduce unnecessary type checking and improve TypeScript performance:
255
+
256
+ ```json title="tsconfig.json"
257
+ {
258
+ "include": ["src"],
259
+ "exclude": ["**/node_modules", "**/.*/"]
260
+ }
261
+ ```
262
+
248
263
  ## Enabling incremental mode
249
264
 
250
265
  TypeScript's "incremental" mode speeds up initial cold-start typechecks keeping an on-disk cache.
@@ -14,4 +14,5 @@ declare function clearFilesChange(compiler: rspack.Compiler): void;
14
14
  * @returns Files change that represents all subsequent changes as a one event
15
15
  */
16
16
  declare function aggregateFilesChanges(changes: FilesChange[]): FilesChange;
17
- export { FilesChange, getFilesChange, consumeFilesChange, updateFilesChange, clearFilesChange, aggregateFilesChanges, };
17
+ export { getFilesChange, consumeFilesChange, updateFilesChange, clearFilesChange, aggregateFilesChanges, };
18
+ export type { FilesChange };
@@ -4,4 +4,4 @@ interface FilesMatch {
4
4
  excluded: string[];
5
5
  extensions: string[];
6
6
  }
7
- export { FilesMatch };
7
+ export type { FilesMatch };
@@ -1,4 +1,5 @@
1
1
  import type { Formatter } from './formatter';
2
- import { BabelCodeFrameOptions } from './types/babel__code-frame';
2
+ import type { BabelCodeFrameOptions } from './types/babel__code-frame';
3
3
  declare function createCodeFrameFormatter(options?: BabelCodeFrameOptions): Formatter;
4
- export { createCodeFrameFormatter, BabelCodeFrameOptions };
4
+ export { createCodeFrameFormatter };
5
+ export type { BabelCodeFrameOptions };
@@ -5,4 +5,5 @@ type FormatterConfig = {
5
5
  pathType: FormatterPathType;
6
6
  };
7
7
  declare function createFormatterConfig(options: FormatterOptions | undefined): FormatterConfig;
8
- export { FormatterConfig, createFormatterConfig };
8
+ export { createFormatterConfig };
9
+ export type { FormatterConfig };
@@ -11,4 +11,4 @@ type CodeframeFormatterOptions = {
11
11
  options?: BabelCodeFrameOptions;
12
12
  };
13
13
  type FormatterOptions = undefined | FormatterType | BasicFormatterOptions | CodeframeFormatterOptions | Formatter;
14
- export { FormatterOptions, FormatterType, BasicFormatterOptions, CodeframeFormatterOptions };
14
+ export type { FormatterOptions, FormatterType, BasicFormatterOptions, CodeframeFormatterOptions, };
@@ -1,4 +1,4 @@
1
1
  import type { Issue } from '../issue';
2
2
  type Formatter = (issue: Issue) => string;
3
3
  type FormatterPathType = 'relative' | 'absolute';
4
- export { Formatter, FormatterPathType };
4
+ export type { Formatter, FormatterPathType };
@@ -485,7 +485,7 @@ function normalizeAndResolvePath(path) {
485
485
  let normalizedPath = realFileSystem.normalizePath(path);
486
486
  try {
487
487
  normalizedPath = realFileSystem.realPath(normalizedPath);
488
- } catch (error) {}
488
+ } catch {}
489
489
  return normalizedPath;
490
490
  }
491
491
  function isArtifact(path) {
@@ -663,7 +663,7 @@ const get_dependencies_worker_getDependenciesWorker = (change)=>{
663
663
  return getDependencies();
664
664
  };
665
665
  exposeRpc(get_dependencies_worker_getDependenciesWorker);
666
- for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
666
+ for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
667
667
  Object.defineProperty(exports, '__esModule', {
668
668
  value: true
669
669
  });
@@ -600,7 +600,7 @@ function normalizeAndResolvePath(path) {
600
600
  let normalizedPath = realFileSystem.normalizePath(path);
601
601
  try {
602
602
  normalizedPath = realFileSystem.realPath(normalizedPath);
603
- } catch (error) {}
603
+ } catch {}
604
604
  return normalizedPath;
605
605
  }
606
606
  function isArtifact(path) {
@@ -756,7 +756,7 @@ function invalidateTsBuildInfo() {
756
756
  const tsBuildInfoPath = typescript.getTsBuildInfoEmitOutputFilePath(parsedConfig.options);
757
757
  if (tsBuildInfoPath) try {
758
758
  system.deleteFile(tsBuildInfoPath);
759
- } catch (error) {}
759
+ } catch {}
760
760
  }
761
761
  }
762
762
  function emitTsBuildInfoIfNeeded(builderProgram) {
@@ -1119,7 +1119,7 @@ const getIssuesWorker = async (change, watching, defaultSeverity)=>{
1119
1119
  return issues;
1120
1120
  };
1121
1121
  exposeRpc(getIssuesWorker);
1122
- for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
1122
+ for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
1123
1123
  Object.defineProperty(exports, '__esModule', {
1124
1124
  value: true
1125
1125
  });