-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Description
π Describe the Bug
missing types
π¬ Minimal Reproduction
just import it in a ts/gts file
π Actual Behavior
no types
π€ Expected Behavior
types
π Environment
- Ember: - 6.7.0-alpha.1
- TS - 5.8.3
@glint/core
- 2.0.0-alpha.2
β Additional Context
This happens because uniqueId is a re-export from @ember/-internals/glimmer
@ember/-internals/glimmer
is in the published types/
directory, but this index.d.ts in that folder is missing all the sub-modules

In particular:
// in: ember-source/types/stable/@ember/-internals/glimmer/index.d.ts
export { uniqueId } from "@ember/-internals/glimmer/lib/helpers/unique-id";
so this file is defined:
declare module '@ember/-internals/glimmer/lib/helpers/unique-id' {
/**
@module ember
*/
const _default: object;
export default _default;
export function uniqueId(): string;
}
the @module
is wrong.. idk what's going on with that.
but anyway,
referencing a declare module is one thing -- but it first has to be loaded in to the TS program in order to be correctly referenced in the first place.
That referencing happens in ember-source/types/stable/index.d.ts
And does include 'unique-id':

Metadata
Metadata
Assignees
Labels
No labels