typescript
配置 .storybook/main.js文件 内容如下
module.exports = {
"stories": [
".....js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-actions",
"@storybook/addon-links"
],typescript...:{
check:false,
checkOptions:{},
reactDocgen:'react-docgen-typescript',
reactDocgenTypescriptOptions...:{
shouldExtractLiteralValuesFromEnum:true,
propFilter:(prop)=>(prop.parent?.../node_modules/.test(prop.parent.fileName):true),
},
},
};
在根目录创建 tsconfig.json文件 ,内容如下
{