Skip to content

refactor: support #6#7

Open
bluelovers wants to merge 1 commit intoaryan-programmer:masterfrom
bluelovers:pr/insof-001
Open

refactor: support #6#7
bluelovers wants to merge 1 commit intoaryan-programmer:masterfrom
bluelovers:pr/insof-001

Conversation

@bluelovers
Copy link
Copy Markdown

BREAKING CHANGE: instanceof will be first class

import { bases, isInstanceOf } from '../index';

class D extends bases(TypeError, Array) {

	constructor () {
		super(
			new TypeError(),
			new Array(),
		)
	}

	getC () {
		return this.bases[0].name + "@D";
	}
}

let e = new D();

console.log(e)

console.dir(D)

console.dir(e instanceof TypeError)
console.dir(e instanceof Array)
console.dir(e instanceof D)

console.dir(isInstanceOf(e, TypeError))
console.dir(isInstanceOf(e, Array))
console.dir(isInstanceOf(e, D))

BREAKING CHANGE: instanceof will be first class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant