Skip to content
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

Remove deprecated with #19638

Merged
merged 3 commits into from
Jul 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions packages/@ember/-internals/glimmer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,34 +88,6 @@
@public
*/

/**
Use the `{{with}}` helper when you want to alias a property to a new name. This is helpful
for semantic clarity as it allows you to retain default scope or to reference a property from another
`{{with}}` block.

If the aliased property is "falsey", for example: `false`, `undefined` `null`, `""`, `0`, `NaN` or
an empty array, the block will not be rendered.

```app/templates/application.hbs
{{! Will only render if user.posts contains items}}
{{#with @model.posts as |blogPosts|}}
<div class="notice">
There are {{blogPosts.length}} blog posts written by {{@model.name}}.
</div>
{{#each blogPosts as |post|}}
<li>{{post.title}}</li>
{{/each}}
{{/with}}
```

@method with
@for Ember.Templates.helpers
@param {Object} options
@return {String} HTML string
@deprecated Use '{{#let}}' instead
@public
*/

/**
`{{yield}}` denotes an area of a template that will be rendered inside
of another template.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,38 +352,6 @@ moduleFor(
this.assertText('number: EVEN0number: ODD1number: EVEN2number: ODD3');
}

['@test [DEPRECATED] dynamic partials in {{#with}}']() {
this.registerPartial('_thing', '{{t}}');

expectDeprecation(() => {
this.render(
strip`
{{#with this.item.thing as |t|}}
{{partial t}}
{{else}}
Nothing!
{{/with}}`,
{
item: { thing: false },
}
);
}, /`{{#with}}` is deprecated\./);

this.assertStableRerender();

this.assertText('Nothing!');

expectDeprecation(() => {
runTask(() => set(this.context, 'item.thing', 'thing'));
}, 'The use of `{{partial}}` is deprecated, please refactor the "thing" partial to a component');

this.assertText('thing');

runTask(() => set(this.context, 'item', { thing: false }));

this.assertText('Nothing!');
}

['@test dynamic partials in {{#let}}']() {
this.registerPartial('_thing', '{{t}}');

Expand Down
Loading