Skip to content

Stop publishing types #217

@chriskrycho

Description

@chriskrycho

We recently discovered internally that the fact that this is publishing types can cause apps and addons which use TypeScript to end up very confused, depending on exactly how they end up resolving the @ember/string types module graph. If they resolve to the types published here, for Ember 3.8, they will always error.

example type error
node_modules/@types/ember/index.d.ts:446:46 - error TS2339: Property 'htmlSafe' does not exist on type 'typeof import("/Users/ckrycho/dev/linkedin/ember-restli-graphql/node_modules/@ember/string/index")'.

446         const htmlSafe: typeof EmberStringNs.htmlSafe;
                                                 ~~~~~~~~

node_modules/@types/ember/index.d.ts:447:48 - error TS2339: Property 'isHTMLSafe' does not exist on type 'typeof import("/Users/ckrycho/dev/linkedin/ember-restli-graphql/node_modules/@ember/string/index")'.

447         const isHTMLSafe: typeof EmberStringNs.isHTMLSafe;
                                                   ~~~~~~~~~~

While it would be nice to fix this simply by fixing the type definitions, we should instead remove the type definitions for now. This will fix the existing issue here, and align us with our current support policy for TypeScript, which is that core Ember addons should not publish types at present: we do not have any stability guarantees around them or their relationship to SemVer!

(I plan to address that with an RFC in the very near future, however, and this repo would be a prime candidate for rolling out support when we do.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions