adopted-ember-addons / ember-changeset

Ember.js flavored changesets, inspired by Ecto
http://bit.ly/ember-changeset-demo
MIT License
431 stars 141 forks source link

TypeScript errors in 4.0.0-beta.4 #639

Closed kpfefferle closed 2 years ago

kpfefferle commented 2 years ago

It seems that some of the typings provided in 4.0.0-beta.4 are invalid/incomplete.

cc: @bartocc

Version

4.0.0-beta.4

Expected Behavior

No type errors on application build

Actual Behavior

../node_modules/ember-changeset/index.d.ts:7:26 - error TS2499: An interface can only extend an identifier/qualified-name with optional type arguments.

7 interface Config extends BufferedChangesetConstructorParameters[3] {
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../node_modules/ember-changeset/index.d.ts:19:17 - error TS7010: 'changeset', which lacks return-type annotation, implicitly has an 'any' return type.

19 export function changeset(...args: changesetFunctionsParameters);
                   ~~~~~~~~~

../node_modules/ember-changeset/index.d.ts:20:17 - error TS7010: 'Changeset', which lacks return-type annotation, implicitly has an 'any' return type.

20 export function Changeset(...args: changesetFunctionsParameters);
                   ~~~~~~~~~
bartocc commented 2 years ago

641 should be better. Thx for reporting @kpfefferle

kpfefferle commented 2 years ago

Thanks @bartocc (and @snewcomer) - I confirm no more TS errors using 4.0.0-beta.5! 👍

snewcomer commented 2 years ago

Awesome! Should get out a 4.0 soon! Just gotta evaluate if we need anything eles