In Codemirror 6's documentation, and in the code line 41, ...
while (pending.length) pending.pop()!(data.updates)
What does this syntax mean? Seems to be typescript specific. What would be the javascript equivalent?
In Codemirror 6's documentation, and in the code line 41, ...
while (pending.length) pending.pop()!(data.updates)
What does this syntax mean? Seems to be typescript specific. What would be the javascript equivalent?
In TypeScript, the !
operator can also be used to assert that a value is non-nullable. This is called a non-null assertion operator, and it is used to tell the TypeScript compiler that a value is definitely not null or undefined. Check the documentation
The pop()
method removes the last element from an array and returns that element. See the documentation.
Since the return value is a function, well you can call it.