In the constructor, we want to set the prop to readonly, you need to do like this:

class Superhero {

    readonly name: string

    constructor(
name: string,
editor: string,
createdYear: number
) { name = this.name;
}
}

最新文章

  1. css整理-05 边框,背景和浮动,定位
  2. Android Handler处理机制 ( 二 ) ——Handler,Message,Looper,MessageQueue
  3. android 4.3源码编译
  4. Linux学习之进程管理
  5. SQL Server 完成性检查的顺序
  6. jail brak 获取当前安装app列表
  7. MongoDB--在windows下的安装过程及基本配置
  8. JavaScript继承的几种实现
  9. css3 手风琴
  10. vue分页效果
  11. 理解DeepBox算法
  12. 查看文件内容 cat , tac
  13. js中的数值转换
  14. appium安装完成后运行和执行python脚本的错误合集
  15. 【读书笔记】iOS-使用蓝牙
  16. java类中使用quartz,设置自动任务Demo
  17. triplet改进,变种
  18. python -m SimpleHTTPServer 8080
  19. django项目中使用项目环境制作脚本 通过终端命令运行脚本文件
  20. Eclipse中各种编码格式及设置

热门文章

  1. pthread_cond 唤醒特定线程的方法
  2. wifi共享精灵2014.04.25.001已经更新,wifi热点中文名走起!
  3. 生成静态页java代码
  4. openssl之EVP系列之6---EVP_Encrypt系列函数编程架构及样例
  5. mbed
  6. UVA 11000- Bee 递推
  7. sdwebimage缓存图片
  8. caffe mnist实例 --lenet_train_test.prototxt 网络配置详解
  9. tomcat开启https服务
  10. Python 递归和二分查找