Microsoft/TypeScript

Unknown interface "ClassMethodDecoratorFunction" in documentation for 5.0.4 lib.decorators.d.ts

开放

#54,099 创建于 2023年5月2日

 (3 条评论) (0 个反应) (0 位负责人)TypeScript (13,395 个派生)batch import
BugDomain: DecoratorsHelp Wanted

仓库指标

星标
 (108,860 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

lib Update Request

Configuration Check

My compilation target is ES2021 and my lib is ["es2017", "dom"].

Missing / Incorrect Definition

The mentioned example:

const bound: ClassMethodDecoratorFunction = (value, context) {
  if (context.private) throw new TypeError("Not supported on private methods.");
  context.addInitializer(function () {
    this[context.name] = this[context.name].bind(this);
  });
}

Uses an Interface ClassMethodDecoratorFunction which isn't implemented - as far as I can tell this should be ClassMethodDecoratorContext instead

Documentation Link

v5.0.4/src/lib/decorators.d.ts

贡献者指南