Replies: 1 comment 1 reply
-
You are not explicitly typing the return something like this should work? interface IMathExtras {
randomInt: (min: number, max: number) => number
}
export const MathExtras: IMathExtras = {
randomInt(min, max) {
return 1;
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, i noticed that JSR now throws error for public objects of package like this:
Error says that MathExtras should have explicit type.
As I understand, I have to define type or interface and bind it to
MathExtras
contant, but I dont want to declare redundant types/interfaces.How is it proposed to declare such objects for JSR?
Beta Was this translation helpful? Give feedback.
All reactions