Closed stormslowly closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
此更改引入了装饰器功能,添加了新的JavaScript和TypeScript文件来定义和使用装饰器。同时,更新了构建测试文件以验证装饰器功能,并在构建过程中检查tsconfig.json
文件的存在。
文件路径 | 更改摘要 |
---|---|
.../fixtures/prepare-build/normal/index.ts |
添加了对装饰器相关模块的导入,并更新了console.log 语句。 |
.../fixtures/prepare-build/normal/paramDecorator/jsDecorator.js |
新增了UseDecorator 类和@prop() 装饰器。 |
.../fixtures/prepare-build/normal/paramDecorator/tsDecorator.ts |
新增了TsUseDecorator 类和@tsProp() 装饰器。 |
.../fixtures/prepare-build/normal/tsconfig.json |
新增tsconfig.json 文件,启用了experimentalDecorators 设置。 |
.../src/features/prepare/build.test.ts |
更新了构建测试文件,添加了对装饰器功能的断言。 |
.../src/features/prepare/build.ts |
添加了对existsSync 的导入,并在构建过程中检查tsconfig.json 文件的存在。 |
在代码的世界里, 装饰器如星辰闪耀, JavaScript与TypeScript, 共同谱写新篇章。 测试与构建齐飞, 代码之美无处不在。
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Size Change: +55 B (0%)
Total Size: 9.9 MB
Filename | Size | Change |
---|---|---|
./packages/preset-umi/dist/features/prepare/build.js |
1.76 kB | +55 B (+3.23%) |
实际 prepare 被有传 tsconfig 给 esbuild,用户根据提示改也不生效。
Summary by CodeRabbit
新功能
UseDecorator
和TsUseDecorator
类,允许在属性和方法参数上使用装饰器。tsconfig.json
文件,启用了experimentalDecorators
设置以支持实验性的装饰器功能。测试