Commit 0016073
authored
feat(superdoc): declare SuperDoc implements SuperDocLike (SD-2917) (#3089)
createSuperDocUI({ superdoc }) accepts the structural SuperDocLike
shape from superdoc/ui. Without an explicit @implements on the
concrete class, consumers had to cast the SuperDoc instance every
time at the package boundary because the type system can't connect
the two on its own.
Add a JSDoc @implements tag and a typedef import so the generated
.d.ts declares the relationship, and consumers can drop the
'as unknown as ...' cast from the very first line of any framework
adapter or example.1 parent 887ee2a commit 0016073
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
0 commit comments