Created
November 30, 2017 00:05
-
-
Save Naddiseo/93803feab8a6c35a102235631b8d6774 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getImpl = async () => { | |
if (__STATICALLY_KNOWN_AT_COMPILE_TIME__) { | |
return await import('alternate-impl.js').API; | |
} | |
return await import('default-impl.js').API; | |
}; | |
class API { | |
static async a() { | |
return (await getImpl()).a(); | |
} | |
static async b() { | |
return (await getImpl()).b(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment