Skip to content

Commit b28239c

Browse files
Add JSDoc types
1 parent ee8a3fb commit b28239c

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

babel.config.cjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
const { NODE_ENV } = process.env;
22

3+
/**
4+
* Babel config
5+
*
6+
* @type {TransformOptions}
7+
*/
38
module.exports = {
49
browserslistEnv: 'javascripts',
510
presets: [
@@ -58,3 +63,7 @@ module.exports = {
5863
},
5964
},
6065
};
66+
67+
/**
68+
* @import { TransformOptions } from '@babel/core'
69+
*/

jest.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Jest config
3+
*
4+
* @type {Config}
5+
*/
16
export default {
27
collectCoverageFrom: ['<rootDir>/src/**/*.{js,mjs,ts,tsx}'],
38
extensionsToTreatAsEsm: ['.jsx', '.ts', '.tsx'],
@@ -7,3 +12,7 @@ export default {
712
'^.+\\.(js|mjs|ts|tsx)$': ['babel-jest', { rootMode: 'upward' }],
813
},
914
};
15+
16+
/**
17+
* @import { Config } from 'jest'
18+
*/

rollup.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const { outDir } = tsBuildConfig.compilerOptions;
1212
const external = Object.keys(packageJson.peerDependencies);
1313

1414
export default defineConfig(
15-
/** @type {const} */ ([
15+
/** @satisfies {OutputOptions[]} */ ([
1616
{
1717
entryFileNames: '[name].cjs',
1818
format: 'cjs',
@@ -24,6 +24,8 @@ export default defineConfig(
2424
]).map(
2525
/**
2626
* Rollup options for each module format
27+
*
28+
* @returns {RollupOptions}
2729
*/
2830
(options) => ({
2931
input: 'src/index.ts',
@@ -73,3 +75,7 @@ export default defineConfig(
7375
}),
7476
),
7577
);
78+
79+
/**
80+
* @import { OutputOptions, RollupOptions } from 'rollup'
81+
*/

0 commit comments

Comments
 (0)