Skip to content

Instantly share code, notes, and snippets.

@AaronNGray
Created September 21, 2023 04:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AaronNGray/157f22983f21fb3496a087b1d959c9f3 to your computer and use it in GitHub Desktop.
Save AaronNGray/157f22983f21fb3496a087b1d959c9f3 to your computer and use it in GitHub Desktop.
instanceof.ts
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