'Angular Node - require not being used

In my Angular 13.x / Typescript 4.x project I have a reference to a node_module @types\prosemirror-schema-list

In it the code uses require :

enter image description here

I added import OrderedMapWORKS from 'orderedmap'; to show it can work.

enter image description here

Given I can't edit the node_module, why would require not work but import from does?

Is there something I can specify in my tsconfig to make it work?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source