Ho convertito il grande progetto JS in dattiloscritto (come programmatore I C#) usando in PhantomJs. Il problema è che l'interprete (phantomjs) non riesce durante l'esecuzione di questo file js.non riesco ad avviare il file compilato da dattiloscritto
D:\My\phantomjs-1.9.7-windows\phantomjs.exe --load-images=false --ssl-protocol=any --web-security=no --cookies-file=cookies C:\Users\alex\Projects\robot\bo.js
TypeError: 'undefined' is not an object (evaluating 'b.prototype')
il codice è:
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]
function __() { this.constructor = d; }
__.prototype = b.prototype; // <<< here
d.prototype = new __();
};
So. Penso che il problema sia in qualche modo legato all'eredità. Qualcuno ha riscontrato questo problema? Qualsiasi aiuto è apprezzato. Grazie.
fa http: // www. typescriptlang.org/Playground compila il tuo codice? o forse una pace di codice? È anche possibile generare mappe di origine per dattiloscritto e ispezionare parti buggy di dattiloscritto in devtools in chrome –