-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop hbs
tag support in ember-template-imports
#465
Conversation
I didn't realize how many tests we had that were using |
TypeScript had to rework a few bits of their AST in light of how decorators shook out for stage 3.
BRUTAL. Thanks for doing this! |
28873c4
to
9432f17
Compare
Swapping tests over to Hopefully CI agrees 🤞 |
Oh, interesting catch and good fix on the build and incremental modes. |
Previously we just left the original source file untouched, which was fine for embedded tagged strings, but causes a cascade of syntax errors if we leave `<template>` around.
9432f17
to
bfdb25e
Compare
@dfreeman I don't understand why With typescript( import Component from "@glimmer/component";
import { action } from "@ember/object";
import { on } from "@ember/modifier";
import { hbs } from "ember-template-imports";
export default class MyButton extends Component {
@action
onClick() {
// do something
}
static template = hbs(`
<button type="button" {{on "click" this.onClick}}>{{yield}}</button>
`, { scope: () => ({ on }) });
} |
Because that’s what we decided to do as a community with emberjs/rfcs#779! |
@chriskrycho Does this mean that we will not be able to write SFC in typescript( |
Yes, the plan is to align everyone on |
Ah ok, thanks, it does make sense now :) |
Aligning with the discussion in ember-cli/ember-template-imports#18, this PR drops support for the
hbs
string tag fromember-template-imports
. The expectation is thatember-template-imports
itself is going to deprecatehbs
soon, and since we have a good opportunity to make breaking changes at the moment, the@glint/environment-ember-template-imports
package now only operates on<template>
literals.