Skip to content

Commit

Permalink
Add file for ensuring implicit .current
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Oct 11, 2024
1 parent 60d391e commit 437d50d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
21 changes: 21 additions & 0 deletions test-app/app/components/implicit-current.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { cell,resource } from 'ember-resources';

export const Now = resource(({ on }) => {
const now = cell(Date.now());

const timer = setInterval(() => {
now.set(Date.now());
});

on.cleanup(() => {
clearInterval(timer);
});

return now;
});


<template>
It is: <time>{{Now}}</time>
It is: <time>{{Now.current}}</time>
</template>
1 change: 0 additions & 1 deletion test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
"ember": {
"edition": "octane"
},
"packageManager": "[email protected]",
"volta": {
"extends": "../package.json"
}
Expand Down
5 changes: 5 additions & 0 deletions test-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"include": ["app/**/*", "tests/**/*", "type-tests/**/*", "types/**/*"],
"compilerOptions": {
"baseUrl": ".",
"skipLibCheck": true,
"noEmit": true,
"declaration": false,
"declarationMap": false,
"emitDeclarationOnly": false,
"paths": {
"test-app/tests/*": ["tests/*"],
"test-app/*": ["app/*"],
Expand Down

0 comments on commit 437d50d

Please sign in to comment.