Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Types for all new EcmaScript objects. #723

Open
dotnetCarpenter opened this issue Nov 23, 2022 · 0 comments
Open

Implement Types for all new EcmaScript objects. #723

dotnetCarpenter opened this issue Nov 23, 2022 · 0 comments

Comments

@dotnetCarpenter
Copy link

It's been more than two years since the last Sanctuary release, so it's understandable that some new EcmaScript objects are not supported by default by Sanctuary. Like the Intl.NumberFormat etc. But it would probably be a good a idea to support them in the next release (whenever that might be).

Example:

console.debug (S.I (new Intl.NumberFormat ('da')))
// Uncaught TypeError: Unrecognized value

Easily fixable with:

const $ = require ('sanctuary-def');

const $IntlNumberFormat = (
  $.NullaryType
    ('Intl.NumberFormat')
    ('https://devdocs.io/javascript/global_objects/intl/numberformat')
    ([])
    (x => Object.prototype.toString.call (x) === '[object Intl.NumberFormat]'));

The list is probably long, so this is just a reminder to write down a list of all new EcmaScript objects that Sanctuary does not support and then, implement Types for them in Sanctuary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant