app's TS files do not properly overwrite an addon's JS files
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, typescript
- 领域
- frontend
调研方向
使用所示的 my-addon/addon 和 my-app/app TypeScript 与 JavaScript 文件重现组件覆盖,然后将其与可正常工作的 JavaScript 覆盖进行比较。跟踪应用组件相对于插件组件的解析过程,并确定 TypeScript 版本失败的原因。完成的标准是,TypeScript 应用组件和模板能够替换插件的 JavaScript 组件,同时保留 Glint 声明。
由索引模型根据 Issue 内容生成。
描述
I have the following example component in my addon:
my-addon/addon/components/example/index.ts
import templateOnly from '@ember/component/template-only';
export default templateOnly();
```hbs
**my-addon/addon/components/example/index.hbs**
Whatever
```
**my-addon/app/components/example/index.js**
```js
export { default } from 'my-addon/components/loading';
```
Then in my app I completely replace it with a new template AND "backing class" with some Glint because why not:
my-app/app/components/index.ts
import templateOnlyComponent from '@ember/component/template-only';
interface LoadingSignature {
Element: HTMLElement; // <i>
}
const LoadingComponent = templateOnlyComponent<LoadingSignature>();
export default LoadingComponent;
declare module '@glint/environment-ember-loose/registry' {
export default interface Registry {
Loading: typeof LoadingComponent;
}
}
my-app/app/components/index.hbs
<div>Whatever</div>
This does not work and throws the following error:
It does work when using a JS file to overwrite the component:
my-app/app/components/index.js
// I have lost all my Glint stuff, because it's a JS file :'(
import templateOnlyComponent from '@ember/component/template-only';
const LoadingComponent = templateOnlyComponent();
export default LoadingComponent;
my-app/app/components/index.hbs
<div>Whatever</div>
- 主要语言
- JavaScript
- 星标
- 77
- 派生
- 65
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ember-cli/ember-cli-htmlbars 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 38/100
ember-cli/ember-cli-htmlbars#792 ·
-
难度 4/5 3-5 天 新手友好度 35/100
ember-cli/ember-cli-htmlbars#787 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 38/100
ember-cli/ember-cli-htmlbars#781 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
ember-cli/ember-cli-htmlbars#779 · 1 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 30/100
ember-cli/ember-cli-htmlbars#753 · 1 条评论 · 1 个 reaction ·
查看 ember-cli/ember-cli-htmlbars 的全部 Issue
相似的 Issue
-
[quality] coverage gate exits 0 when the test run is killed by a signal (tests/tools/coverage-report.mjs:680 `?? 1` is untested)可能已有人在做 @hivecommons-hive 今天认领。 未关闭agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
feedback simulation workshop
难度 2/5 1-3 小时 新手友好度 84/100
githubnext/gh-aw-workshop#4174 ·
维护者通常 1 天内回复
-
sendDefaultPii is reported as deprecated on ReactNativeOptions although dataCollection is hidden未关闭Bug React-Native Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 85/100
getsentry/sentry-react-native#6830 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
JuliusBrussee/caveman#1183 · 1 条评论 ·
维护者通常 1 天内回复