Generic interface to declare a typesafe get function based on the given configuration type.
interface PreferenceConfiguration { 'myext.enabled': boolean,}const enabled : boolean = prefs.get('myext.enabled'); // validconst debug : string = prefs.get('myext.enabled'); // invalidprefs.get('foobar'); // invalid Copy
interface PreferenceConfiguration { 'myext.enabled': boolean,}const enabled : boolean = prefs.get('myext.enabled'); // validconst debug : string = prefs.get('myext.enabled'); // invalidprefs.get('foobar'); // invalid
Optional
Generic interface to declare a typesafe get function based on the given configuration type.
Illustration