cedric
02/23/2017, 2:21 PMinterface Config {
[prop: string]: boolean;
}
declare const options: Config;
// Used to be an error, now allowed!
if (options.debugMode) {
// ...
}
aimozg
02/23/2017, 9:53 PMdeclare const options: any;
if (options.debugMode) ...
TS.stricter: interface Config { debugMode: boolean }
declare const options: Config;
if (options.debugMode) ...
TS.stricter.relaxed: interface Config { [prop: string]: boolean }
declare const options: Config;
if (options["debugMode"]) ...
TS.stricter.relaxed.looksStricter: interface Config { [prop: string]: boolean }
declare const options: Config;
if (options.debugMode) ...
cedric
02/24/2017, 1:46 AMkeyof
), I wonder if Kotlin will have to make similar sacrifices for its Javascript backend