mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-05 09:00:12 +08:00
Technically lastError is not present if there is no error ( 'lastError' in chrome.runtime === false ). TypeScript currently cannot express this. Since chrome.runtime is declared as namespace and not as interface, it is not possible to use optional variable, hence undefined type. See documentation: https://developer.chrome.com/extensions/runtime#property-lastError