/// <reference path="../../../typings/index.d.ts" />'use strict';import * as AV from 'leanengine';class Todo extends AV.Object {}AV.Object.register(Todo);/** * model */export default { class: Todo, save(todo: Todo, attr_map : Object): AV.Promise{ for(temp in Object.keys(attr_map)){ todo.set(temp, attr_map[temp]) } return todo.save() }}temp is not defined這個錯誤是報的我莫名其妙啊,百撕不得解開一觀。 async indexAction(){ let todo_inst = new todo.class() await todo.save(todo_inst, { content: "test", name: "yugo" }) console.log( todo_inst) this.assign({ isIndex: true }) return this.display(); }這個async是紅色的,能運行但是subl報錯,講道理ts兼容es6啊。ThinkJS框架
typescript 用不了For In 和 Async ?
泛舟湖上清波郎朗
2018-09-04 13:29:33