mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Component commits:f4a5562543wip: possible fixes75cb7392f3pass parameter type to assignBindingElementTypes4a7de63c83undo unnecessary changesb618cf9371update baselines Co-authored-by: Gabriela Araujo Britto <gabrielaa@microsoft.com>
This commit is contained in:
co-authored by
Gabriela Araujo Britto
parent
83efc9f0d6
commit
b6ec37aac2
@@ -0,0 +1,13 @@
|
||||
interface Slugs {
|
||||
foo: string;
|
||||
bar: string;
|
||||
}
|
||||
|
||||
function call<T extends object>(obj: T, cb: (val: T) => void) {
|
||||
cb(obj);
|
||||
}
|
||||
|
||||
declare let obj: Slugs;
|
||||
call(obj, ({foo, ...rest}) => {
|
||||
console.log(rest.bar);
|
||||
});
|
||||
Reference in New Issue
Block a user