合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
不允许声明空接口。
- // code-linter.json5
- {
- "rules": {
- "@typescript-eslint/no-empty-interface": "error"
- }
- }
- // an interface with any number of members
- interface Foo {
- name: string;
- }
-
- interface Bar {
- age: number;
- }
-
- // an interface with more than one supertype
- // in this case the interface can be used as a replacement of an intersection type.
- export interface Baz extends Foo, Bar {}
- // an empty interface
- interface Foo {}
-
- // an interface with only one supertype (Bar === Foo)
- export interface Bar extends Foo {}
-
- // an interface with an empty list of supertypes
- export interface Baz {}
合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
解决方案
精准高效的一站式服务支持,助力开发者商业成功