Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tsc/internal/checker/nodebuilderscopes.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ func (b *NodeBuilderImpl) enterNewScope(declaration *ast.Node, expandedParams []
for _, e := range p.Elements.Nodes {
switch e.Kind {
case ast.KindOmittedExpression:
return
continue
case ast.KindBindingElement:
bindElement(e.AsBindingElement())
return
continue
default:
panic("Unhandled binding element kind")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ export const b2 = (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN
export const b3 = (isNaN: number, bar: typeof globalThis.isNaN) => bar;
export const b4 = (isNaN: number) => globalThis.isNaN;

export const laterArrayElement = ([first, isNaN]: [number, number]) => globalThis.isNaN;
export const omittedArrayElement = ([, isNaN]: [number, number]) => globalThis.isNaN;
export const laterObjectElement = ({ first, isNaN }: { first: number; isNaN: number }) => globalThis.isNaN;
export const nestedElements = ([[first, isNaN], parseInt]: [[number, number], number]) => ({
isNaN: globalThis.isNaN,
parseInt: globalThis.parseInt,
});

export const bObj = {
b1: (isNaN: typeof globalThis.isNaN) => isNaN,
b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => bar ?? isNaN,
Expand Down Expand Up @@ -127,6 +135,16 @@ export declare const b1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.i
export declare const b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN;
export declare const b3: (isNaN: number, bar: typeof globalThis.isNaN) => typeof globalThis.isNaN;
export declare const b4: (isNaN: number) => typeof globalThis.isNaN;
export declare const laterArrayElement: ([first, isNaN]: [number, number]) => typeof globalThis.isNaN;
export declare const omittedArrayElement: ([, isNaN]: [number, number]) => typeof globalThis.isNaN;
export declare const laterObjectElement: ({ first, isNaN }: {
first: number;
isNaN: number;
}) => typeof globalThis.isNaN;
export declare const nestedElements: ([[first, isNaN], parseInt]: [[number, number], number]) => {
isNaN: typeof globalThis.isNaN;
parseInt: typeof globalThis.parseInt;
};
export declare const bObj: {
b1: (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN;
b2: (isNaN: typeof globalThis.isNaN, bar?: typeof globalThis.isNaN) => typeof globalThis.isNaN;
Expand Down
Loading
Loading