We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pick
omit
Describe the bug
Found on #5926 (comment)
The code below throws a runtime error on o.foo() but type errors.
o.foo()
import { pick } from "jsr:@std/collections/pick"; import { omit } from "jsr:@std/collections/omit"; class A { constructor(public a: string, public b: string, public c: string) {} foo(): string { return "hello"; } } const obj = new A("a", "b", "c"); const p = pick(obj, ["a", "c", "foo"]); const o = omit(obj, ["b"]); console.log(obj.foo()); console.log(p.foo()); console.log(o.foo());
Closely related to #5927
Steps to Reproduce
Expected behavior
While the code doesn't throw type error, we should keep non listed methods in omit (o.foo() should be available.)
Environment
The text was updated successfully, but these errors were encountered:
undefined
No branches or pull requests
Describe the bug
Found on #5926 (comment)
The code below throws a runtime error on
o.foo()
but type errors.Closely related to #5927
Steps to Reproduce
Expected behavior
While the code doesn't throw type error, we should keep non listed methods in
omit
(o.foo()
should be available.)Environment
The text was updated successfully, but these errors were encountered: