We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我是TS初学者 这一块看不懂 有可以正常运行的示例吗
The text was updated successfully, but these errors were encountered:
@luckyriko
interface NumberOrStringDict { [index: string]: number | string; length: number; // ok, length is a number name: string; // ok, name is a string }
这个是一种正确的用法。
如果把 [index: string]: number | string; 写成 [index: string]: number; 或 [index: string]: string; 都不可以。
[index: string]: number | string;
[index: string]: number;
[index: string]: string;
Sorry, something went wrong.
No branches or pull requests
我是TS初学者 这一块看不懂 有可以正常运行的示例吗
The text was updated successfully, but these errors were encountered: