Skip to content

Commit 2a2cdbc

Browse files
authored
Merge pull request #419 from ember-cli/make-usable
Make usable
2 parents a763bd5 + c9b17bb commit 2a2cdbc

File tree

7 files changed

+64
-64
lines changed

7 files changed

+64
-64
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@
7373
"@embroider/vite": "^1.1.5",
7474
"@eslint/js": "^9.17.0",
7575
"@glimmer/component": "^2.0.0",
76-
"@glint/ember-tsc": "^1.0.0",
77-
"@glint/template": "^1.6.0",
78-
"@glint/tsserver-plugin": "^2.0.0",
76+
"@glint/ember-tsc": "^1.0.8",
77+
"@glint/template": "^1.7.3",
78+
"@glint/tsserver-plugin": "^2.0.8",
7979
"@rollup/plugin-babel": "^6.0.4",
8080
"@types/qunit": "^2.19.12",
8181
"@types/semver": "^7.7.1",

pnpm-lock.yaml

Lines changed: 52 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

Whitespace-only changes.

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as WelcomePage } from './components/welcome-page.gts';

src/template-registry.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// Add all your components, helpers and modifiers to the template registry here, so apps don't have to do this.
33
// See https://typed-ember.gitbook.io/glint/environments/ember/authoring-addons
44

5-
// import type MyComponent from './components/my-component';
5+
import type WelcomePage from './components/welcome-page.gts';
66

77
// Uncomment this once entries have been added! 👇
8-
// export default interface Registry {
9-
// MyComponent: typeof MyComponent
10-
// }
8+
export default interface Registry {
9+
WelcomePage: typeof WelcomePage;
10+
}

tests/integration/components/welcome-page-test.gts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ import { module, test } from 'qunit';
55
import semver from 'semver';
66
import { setupRenderingTest } from 'ember-qunit';
77

8-
// @ts-expect-error cannot find module or types?
9-
import WelcomePage from 'ember-welcome-page/components/welcome-page';
8+
// need declarations to exist to import from package name
9+
// without them 'ember-welcome-page/components/welcome-page'
10+
// will not find it's types
11+
import WelcomePage from '#src/components/welcome-page.gts';
1012

1113
function getCurrentVersion() {
1214
if (semver.valid(VERSION) && !semver.prerelease(VERSION)) {

unpublished-development-types/index.d.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// Add any types here that you need for local development only.
22
// These will *not* be published as part of your addon, so be careful that your published code does not rely on them!
33

4-
import '@glint/environment-ember-loose';
5-
import '@glint/environment-ember-template-imports';
6-
74
// Uncomment if you need to support consuming projects in loose mode
85
//
96
// declare module '@glint/environment-ember-loose/registry' {

0 commit comments

Comments
 (0)