Ben 'uzatmak' Resig en kullanır mevcut koduna başvuruda çalışıyorum, ama hataların bir demet alıyorum
------ test.ts --------
/// <reference path=myclass.js />
var m = new MyClass (3);
------ myclass.js --------
/// <reference path=class.js />
var MyClass = Class.extend({
init: function (i)
{
this.i = i;
},
})
------ class.js --------
(copied from http://ejohn.org/blog/simple-javascript-inheritance/)
hatalar:
Supplied parameters do not match any signature of call target
The name 'Class' does not exist in the current scope
The property 'extend' does not exist on value of type '() => void'
The name 'Class' does not exist in the current scope
i sonunda ben typescript uzatmak tabanlı kod yeniden yazmak isterdim biliyoruz, ama o zamana kadar, nasıl yeni koddan başvuru?
neden javascript kodu var olan tip hataları hakkında şikayet - Bu derin bir soru yalvarır tahmin?













