We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49c77da commit 5d7856bCopy full SHA for 5d7856b
src/lib/converter/plugins/ImplementsPlugin.ts
@@ -1,4 +1,3 @@
1
-import { ok } from "assert";
2
import * as ts from "typescript";
3
import {
4
DeclarationReflection,
@@ -233,10 +232,13 @@ export class ImplementsPlugin extends ConverterComponent {
233
232
return;
234
}
235
236
- ok(
237
- reflection.parent instanceof DeclarationReflection,
238
- "Should be impossible, disallowed by converter."
239
- );
+ // Need this because we re-use reflections for type literals.
+ if (
+ !reflection.parent ||
+ !reflection.parent.kindOf(ReflectionKind.ClassOrInterface)
+ ) {
240
+ return;
241
+ }
242
243
const symbol = context.project.getSymbolFromReflection(
244
reflection.parent
0 commit comments