Created
September 21, 2023 04:33
-
-
Save AaronNGray/157f22983f21fb3496a087b1d959c9f3 to your computer and use it in GitHub Desktop.
instanceof.ts
This file contains 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
abstract class A { | |
abstract run(): Promise<void> | |
} | |
export class B implements A { | |
async run(): Promise<void> { | |
} | |
} | |
const I = new B(); | |
console.log("I instanceof A =", I instanceof A); | |
console.log("I instanceof B =", I instanceof B); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment