0
如何在給定值後再次將變量設置爲undefined?未定義Typescript中的變量
對於檢查,我使用下劃線功能_.isUndefined()
。
已經嘗試過myVariable = undefined
和delete myVariable
如何在給定值後再次將變量設置爲undefined?未定義Typescript中的變量
對於檢查,我使用下劃線功能_.isUndefined()
。
已經嘗試過myVariable = undefined
和delete myVariable
照照underscope實現:https://github.com/jashkenas/underscore/blob/master/underscore.js#L1337
嘗試myVariable = void 0;
爲什麼不'MYVARIABLE = undefined'工作?這就是你如何設置一個變量爲undefined ... – evolutionxbox
TypeScript上的什麼版本是這樣的? 1.x還是2.x? –