Skip to content

Commit 3b2083b

Browse files
authored
fix: remove hasInstance traits (#10)
fix: remove hasInstance traits
1 parent 57033af commit 3b2083b

File tree

4 files changed

+0
-40
lines changed

4 files changed

+0
-40
lines changed

src/nodes/ReferenceNode.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { isLocalRef } from '@stoplight/json';
22

33
import { unwrapStringOrNull } from '../accessors/unwrap';
4-
import { isReferenceNode, isSchemaNode } from '../guards';
54
import type { SchemaFragment } from '../types';
65
import { BaseNode } from './BaseNode';
76

@@ -17,8 +16,4 @@ export class ReferenceNode extends BaseNode {
1716
public get external() {
1817
return this.value !== null && !isLocalRef(this.value);
1918
}
20-
21-
static [Symbol.hasInstance](instance: unknown) {
22-
return isSchemaNode(instance) && isReferenceNode(instance);
23-
}
2419
}

src/nodes/RegularNode.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { getTypes } from '../accessors/getTypes';
88
import { getValidations } from '../accessors/getValidations';
99
import { isDeprecated } from '../accessors/isDeprecated';
1010
import { unwrapArrayOrNull, unwrapStringOrNull } from '../accessors/unwrap';
11-
import { isRegularNode, isSchemaNode } from '../guards';
1211
import type { SchemaFragment } from '../types';
1312
import { BaseNode } from './BaseNode';
1413
import type { ReferenceNode } from './ReferenceNode';
@@ -66,8 +65,4 @@ export class RegularNode extends BaseNode {
6665
Object.keys(this.annotations).length + Object.keys(this.validations).length === 0
6766
);
6867
}
69-
70-
static [Symbol.hasInstance](instance: unknown) {
71-
return isSchemaNode(instance) && isRegularNode(instance);
72-
}
7368
}

src/nodes/__tests__/ReferenceNode.spec.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/nodes/__tests__/RegularNode.spec.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)