You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,11 +71,18 @@ module.exports = {
71
71
72
72
(If you're wondering why the configuration sits within a "default" property, that's to allow for [Profiles](./profiles.md).)
73
73
74
-
### Type checking
74
+
### TypeScript
75
75
76
-
If you want to type check your configuration, we export two types that can help with that:
77
-
-`IProfiles` represents the dictionary of profile names to configuration objects exported for CommonJS
78
-
-`IConfiguration` represents a single configuration object exported with named exports for ESM (`Partial<IConfiguration>` will be more useful in practise)
76
+
You can also write your configuration file in TypeScript, with a `.ts`, `.mts` or `.cts` extension. These files are loaded with [Node.js built-in TypeScript support](https://nodejs.org/api/typescript.html), which has several caveats and limitations, mostly that your `tsconfig.json` won't be honoured and that you need to be explicit about type imports. Here's an example:
0 commit comments