[英]Expected an assignment or function call and instead saw an expression when defining interface
Im trying to build a form and start by defining an interface我试图构建一个表单并从定义一个接口开始
interface TokenListProps { readonly contractAddress: string; }
and I get a compile error 'Expected an assignment or function call and instead saw an expression' for this line.并且我收到此行的编译错误“预期分配或函数调用,而是看到了一个表达式”。
Any suggestions on why this might be?关于为什么会这样的任何建议?
Based upon the info you have provided the issue is the newlines in your definitions.根据您提供的信息,问题是您定义中的换行符。
You currently have this:你目前有这个:
interface
TokenListProps
{
readonly
contractAddress: string;
}
And it should be like this:它应该是这样的:
interface TokenListProps
{
readonly contractAddress: string;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.