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

short tutorial "lingascript in 5 min" #19

Open
nobodxbodon opened this issue Feb 14, 2019 · 8 comments
Open

short tutorial "lingascript in 5 min" #19

nobodxbodon opened this issue Feb 14, 2019 · 8 comments

Comments

@nobodxbodon
Copy link
Contributor

Similar to this tutorial written for CTS. It can be a first 'real-world' test case.
I'll start the document in a separate repo for now.

@nobodxbodon
Copy link
Contributor Author

FYI below works as I tested:

接口  {
  姓: 文字;
  名: 文字;
}

函数 问好(那谁: ) {
  返回 "吃了么, " + 那谁.姓 + 那谁.名;
}

变量 路人 = {姓: "", 名: ""};

document.body.innerHTML = 问好(路人);

@gasolin
Copy link
Owner

gasolin commented Feb 17, 2019

@nobodxbodon 我建議用 Javascript 相容語法來介紹的就好,可以便於讓更多人理解。
雖然做得到 ,但不需要強調 typescript 的部分(接口 人)

@nobodxbodon
Copy link
Contributor Author

好的. 上面的例程是取自TS官方文档TypeScript in 5 minutes.
请问有没有JS的入门教程推荐? 我可以试试改编为中文例程的版本(像之前的Java编程一天入门).

@gasolin
Copy link
Owner

gasolin commented Feb 23, 2019

0.3 版支援中文命令列工具(TS 官方自帶,通常是集成到 VS 時用的),
順道做了個短片演示
Imgur

@nobodxbodon
Copy link
Contributor Author

赞! 不知是否已有介绍文章? 如果有的话, 请问是否可以在知乎等社区发表/转载?

@gasolin
Copy link
Owner

gasolin commented Mar 14, 2019

LingaScript 相關實現文章 https://blog.gasolin.idv.tw/2019/03/08/introducing_lingascript/ 歡迎轉載

@nobodxbodon
Copy link
Contributor Author

@gasolin 辛苦! 刚转载在知乎, 短片演示由于上传原gif总是失败, 于是转录成视频了. 如有不妥之处请指出.

@nobodxbodon
Copy link
Contributor Author

刚写了篇实测文. 感觉IDE支持还是蛮需要的, 后缀是.ts就会被认为TypeScript代码, 导致很多语法错误提示. CTS是改了后缀, 然后用插件支持高亮等等.

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

2 participants