| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 1x 1x | import DocumentLike from '../NodeLike/ParentNodeLike/DocumentLike/DocumentLike'; import IDocumentLike from '../NodeLike/ParentNodeLike/DocumentLike/IDocumentLike'; function documentConstructor(): IDocumentLike { // @ts-ignore if (typeof Document === 'function') { // @ts-ignore return new Document(); } else { return new DocumentLike(); } } export default documentConstructor; |