Giter Club home page Giter Club logo

Comments (5)

jelhan avatar jelhan commented on June 5, 2024 1

I can still reproduce the issue with Ember Intl v6.4.0, which is the latest version today.

I'm seeing the following errors:

 [lint:types] node_modules/ember-intl/-private/formatters/-base.d.ts:1:33 - error TS2307: Cannot find module '@ember/template/-private/handlebars' or its corresponding type declarations.
[lint:types] 
[lint:types] 1 import type { SafeString } from '@ember/template/-private/handlebars';
[lint:types]                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[lint:types] 
[lint:types] node_modules/ember-intl/-private/formatters/format-message.d.ts:1:33 - error TS2307: Cannot find module '@ember/template/-private/handlebars' or its corresponding type declarations.
[lint:types] 
[lint:types] 1 import type { SafeString } from '@ember/template/-private/handlebars';
[lint:types]                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[lint:types] 
[lint:types] node_modules/ember-intl/services/intl.d.ts:1:36 - error TS2307: Cannot find module '@ember/runloop/types' or its corresponding type declarations.
[lint:types] 
[lint:types] 1 import type { EmberRunTimer } from '@ember/runloop/types';
[lint:types]                                      ~~~~~~~~~~~~~~~~~~~~~~
[lint:types] 
[lint:types] node_modules/ember-intl/services/intl.d.ts:3:33 - error TS2307: Cannot find module '@ember/template/-private/handlebars' or its corresponding type declarations.
[lint:types] 
[lint:types] 3 import type { SafeString } from '@ember/template/-private/handlebars';
[lint:types]                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please find a reproduction here: https://github.com/jelhan/test-ember-intl-with-ember-native-types

from ember-intl.

ijlee2 avatar ijlee2 commented on June 5, 2024

@jelhan Thanks for checking the latest version and providing a demo app.

Between 6.3.2 and 6.4.0, I didn't update the intl service and the private files in -private/formatters, so I think it's expected that we continue to see type errors.

from ember-intl.

jelhan avatar jelhan commented on June 5, 2024

I can fix the issue by patching Ember Intl's types locally as the following:

- import type { SafeString } from '@ember/template/-private/handlebars';
+ import type { SafeString } from '@ember/template';
- import type { EmberRunTimer } from '@ember/runloop/types';
+ import type { Timer as EmberRunTimer } from '@ember/runloop';

Not sure if those changes would work with types from @types/ember* as well.

from ember-intl.

ijlee2 avatar ijlee2 commented on June 5, 2024

I can fix the issue by patching Ember Intl's types locally as the following:

Nice! Can you create a pull request to test the change in this repo? The CI, which lints the files in ember-intl and test-app directories, will help us check. (You can also run pnpm lint locally, either at the workspace root, or at the root of a package.)

from ember-intl.

jelhan avatar jelhan commented on June 5, 2024

Can you create a pull request to test the change in this repo? The CI, which lints the files in ember-intl and test-app directories, will help us check.

Please find the PR here: #1825

Sadly, the changes do not work with types published from @types/ember*. 😢

from ember-intl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.