You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In short: in TypeScript IParserErrorMessageProvider implementation requires use of 'fat arrow' syntax, while implementation of ILexerErrorMessageProvider doesn't.
This syntax works only for ILexerErrorMessageProvider:
It is true the APIs use different styles (multiple parameters vs single config object param) TBH
I do not recall why exactly is that 😄, but I'm uncertain it is a big issue...
Well, it's not required to compile, but is required to work. Without fat arrow parser returns original messages. You should try it :)
I suppose it has smth to do with the implementation of utils.defaults()
Interesting point, I suppose there is an assumption that these properties exist directly on the object passed and because you implement this interface using a class rather than a plain object literal then the utils.defaults overrides those.
I will take a deeper look (hopefully on the weekend).
bd82
changed the title
Inconsistent implementation of IParserErrorMessageProvider and ILexerErrorMessageProvider
IParserErrorMessageProvider properties must be implemented as **own** properties
Apr 17, 2020
The fix should be in 7.0.0 which will hopefully be released this weekend.
I removed the use of defaults completely, I don't think it fits well when the interface includes methods.
In short: in TypeScript IParserErrorMessageProvider implementation requires use of 'fat arrow' syntax, while implementation of ILexerErrorMessageProvider doesn't.
This syntax works only for ILexerErrorMessageProvider:
IParserErrorMessageProvider requires fat arrow syntax to work:
The text was updated successfully, but these errors were encountered: