ember-math-helpers
ember-math-helpers copied to clipboard
use types shipped by ember-source
The types generated using DefinetlyTyped are incompatible with types shipped by ember-source:
[lint:types] node_modules/ember-math-helpers/declarations/helpers/sub.d.ts:21:50 - error TS2694: Namespace '"@ember/component/helper"' has no exported member 'EmptyObject'.
[lint:types]
[lint:types] 21 Named: import("@ember/component/helper").EmptyObject;
[lint:types] ~~~~~~~~~~~
Types generated by this PR:
/// <reference types="ember-source/types/stable/@ember/-internals/glimmer/lib/helper" />
/// <reference types="ember-source/types/stable/@ember/component/helper" />
export interface SubSignature {
Args: {
Positional: Array<number>;
};
Return: number;
}
/**
* Subtracts two or more numbers
*
* ```hbs
* {{sub a b}}
* ```
*
* @param numbers A list of numbers to subtract
* @return The difference of all the passed numbers
*/
export declare function sub(numbers: Array<number>): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<SubSignature>;
export default _default;
//# sourceMappingURL=sub.d.ts.map
Types generated by latest main branch:
export interface SubSignature {
Args: {
Positional: Array<number>;
};
Return: number;
}
/**
* Subtracts two or more numbers
*
* ```hbs
* {{sub a b}}
* ```
*
* @param numbers A list of numbers to subtract
* @return The difference of all the passed numbers
*/
export declare function sub(numbers: Array<number>): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
Args: {
Positional: number[];
Named: import("@ember/component/helper").EmptyObject;
};
Return: number;
}>;
export default _default;
//# sourceMappingURL=sub.d.ts.map
I'm not sure if the two lines at the top of the generated types starting with three slashes (///
) could cause any harm. Especially if they break incompatibility with consumers using typed from DefinetlyTyped. I'm not a TypeScript expert and honestly just not being sure what that reference is about at all.
Closes #1220
@jelhan thanks for the PR! It looks like the pnpm lockfile is outdated. Can you please make sure that is updated?
@jelhan thanks for the PR! It looks like the pnpm lockfile is outdated. Can you please make sure that is updated?
Done. Not sure why it wasn't committed in the first time.
@jelhan I rebased this and it seems to be failing now. Any ideas?
@jelhan I rebased this and it seems to be failing now. Any ideas?
Seems to be an upstream issue in types of Glimmer package. Likely very recently introduced.
I created this upstream issue: https://github.com/glimmerjs/glimmer-vm/issues/1586
@RobbieTheWagner: I think I fixed it with support of @NullVoxPopuli. Please approve the workflow to see if it is actually passing in CI as well.