如何在打字稿中从单独的嵌入式函数内击中某个函数?嵌套方法中的命中方法
我试图完成什么...在伪;
export class blah {
functionOne(result) {
// do stuff with the result of functionTwoChildMethod...
};
const geocoder = new google.maps.Geocoder();
geocoder.geocode (paramObj, function (res, stat) {
functionTwoChildMethod =() => {
this.functionOne(result);
};
};
};
似乎做this.functionOne(result);
没有达到类范围的母体火过functionOne什么的。那么我错过了什么?感谢您的任何方向这已经困扰了我的时间比我愿意分享:)
HA!是的......那不是我会猜到的逻辑!非常感谢!如果我也可以upvote,但我会,但我的代表太低了,但你要么我的感谢! :) – LearningNewStuff
别担心,我只是高兴地帮助:) –