Skip to content
New issue

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

dara publish 注释问题 #96

Closed
yhydev opened this issue Oct 10, 2021 · 4 comments
Closed

dara publish 注释问题 #96

yhydev opened this issue Oct 10, 2021 · 4 comments

Comments

@yhydev
Copy link

yhydev commented Oct 10, 2021

使用:dara publish 时候报错,原因是dara 文件中的多行注释导致的。

main.dara

type @organization = string

// 定义一个 model
model User {
  name: string,
  age: number
}

/**
 * 模块的初始化函数
 * @param organization 
 */
init(organization: string) {
  @organization = organization;
}

/**
 * 模块的静态方法
 * @param username 
 * @param age
 */
static function getUser(username: string, age: number): string {
  var user = new User{
    name = username,
    age = age
  };
  return `user's name is ${user.name} ,user's age is ${user.age}! `;
} 

报错原因:
1633881542(1)

@yhydev yhydev changed the title dara publish 注解问题 dara publish 注释问题 Oct 10, 2021
@yhydev
Copy link
Author

yhydev commented Oct 10, 2021

注释中的@符号导致的,请问这个怎么解决?

@peze
Copy link
Contributor

peze commented Nov 18, 2021

这个 @param 符号默认是要解析的,所以造成了解析出错
建议直接这样写
@param username the name of user

@yhydev
Copy link
Author

yhydev commented Nov 18, 2021

这个 @param 符号默认是要解析的,所以造成了解析出错 建议直接这样写 @param username the name of user

不太明白你的意思?

@JacksonTian
Copy link
Contributor

就是这样设计的。 @param ”param name“ “param description”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants