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
hbsstring tag fromember-template-imports. The expectation is thatember-template-importsitself is going to deprecatehbssoon, and since we have a good opportunity to make breaking changes at the moment, the@glint/environment-ember-template-importspackage now only operates on<template>literals.