Jemt / Fit.UI

Fit.UI is a JavaScript based UI framework built on Object Oriented principles
http://fitui.org
GNU Lesser General Public License v3.0
19 stars 7 forks source link

Do not use reserved keyword interface #185

Closed kollster closed 1 year ago

kollster commented 1 year ago

When bundling fit-ui into strict es modules (e.g. using Vite) an error is thrown that fit-ui is using the reserved keyword interface.

See MDN entry on reserved words: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#future_reserved_words

The keyword interface is used in the following places:

https://github.com/Jemt/Fit.UI/blob/fca144f9d6fca2c23de43bcab8e4cc53a4abd16e/Controls/Dialog/Dialog.js#L1463

https://github.com/Jemt/Fit.UI/blob/fca144f9d6fca2c23de43bcab8e4cc53a4abd16e/Controls/Dialog/Dialog.js#L1495

https://github.com/Jemt/Fit.UI/blob/fca144f9d6fca2c23de43bcab8e4cc53a4abd16e/Controls/Dialog/Dialog.js#L1574

The issue can be resolved by renaming var interface to const api (const because the variable is not reassigned).

FlowIT-JIT commented 1 year ago

Thanks for reporting - the bug has been confirmed and will be fixed with the next release.

FlowIT-JIT commented 1 year ago

Fixed and published as NPM package version 2.12.5