Typescript `Pick` unexpectedly allows any property value

后端 未结 0 885
故里飘歌
故里飘歌 2021-02-02 00:50

Here\'s a simple type I compiled with TS4.1.3:

interface Foo {
    [key: string]: any;
    bar: \'baz\';
}

This should allow any value to any pro

相关标签:
回答
  • 消灭零回复
提交回复
热议问题