File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -11040,8 +11040,7 @@ namespace ts {
11040
11040
11041
11041
function hasContextSensitiveReturnExpression(node: FunctionLikeDeclaration) {
11042
11042
// TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value.
11043
- const body = node.body!;
11044
- return body.kind === SyntaxKind.Block ? false : isContextSensitive(body);
11043
+ return !!node.body && node.body.kind !== SyntaxKind.Block && isContextSensitive(node.body);
11045
11044
}
11046
11045
11047
11046
function isContextSensitiveFunctionOrObjectLiteralMethod(func: Node): func is FunctionExpression | ArrowFunction | MethodDeclaration {
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts' />
2
+
3
+ ////interface ProxyHandler<T extends object> {
4
+ //// getPrototypeOf?(target: T): object | null;
5
+ //// }
6
+ ////interface ProxyConstructor {
7
+ //// new <T extends object>(target: T, handler: ProxyHandler<T>): T;
8
+ //// }
9
+ ////declare var Proxy: ProxyConstructor;
10
+ ////let target = {}
11
+ ////let proxy = new /**/Proxy(target, {
12
+ //// getPrototypeOf()
13
+ //// })
14
+
15
+ goTo . marker ( "" ) ;
16
+ verify . quickInfoExists ( ) ;
You can’t perform that action at this time.
0 commit comments