feat: Add return type hints for closures with block bodies
This commit is contained in:
@@ -103,6 +103,7 @@ export class Config {
|
||||
typeHints: this.get<boolean>("inlayHints.typeHints"),
|
||||
parameterHints: this.get<boolean>("inlayHints.parameterHints"),
|
||||
chainingHints: this.get<boolean>("inlayHints.chainingHints"),
|
||||
closureReturnTypeHints: this.get<boolean>("inlayHints.closureReturnTypeHints"),
|
||||
hideNamedConstructorHints: this.get<boolean>("inlayHints.hideNamedConstructorHints"),
|
||||
smallerHints: this.get<boolean>("inlayHints.smallerHints"),
|
||||
maxLength: this.get<null | number>("inlayHints.maxLength"),
|
||||
|
||||
@@ -14,7 +14,8 @@ export function activateInlayHints(ctx: Ctx) {
|
||||
|
||||
const anyEnabled = ctx.config.inlayHints.typeHints
|
||||
|| ctx.config.inlayHints.parameterHints
|
||||
|| ctx.config.inlayHints.chainingHints;
|
||||
|| ctx.config.inlayHints.chainingHints
|
||||
|| ctx.config.inlayHints.closureReturnTypeHints;
|
||||
const enabled = ctx.config.inlayHints.enable && anyEnabled;
|
||||
if (!enabled) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user