Serpack
Plugin api
Generate .d.ts

Generate .d.ts

Using serpack-declaration plugin, you can generate .d.ts(type declaration) file.

Typescript
import { join } from 'path';
import { TypeDeclaration } from 'serpack-declaration';
 
export default <import('serpack').Options>{
  compilerOptions: {
    plugins: [TypeDeclaration(join(process.cwd(), './types/'))],
  },
};