Skip to content

Remove Undefined module #59

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

Merged
merged 2 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Fixed type signatures of `Array.fromArrayLikeWithMap` and `Array.fromIteratorWithMap`. https://github.com/rescript-association/rescript-core/pull/50
- Remove internal async/await helpers that do not need to be exposed in `Core`.
- Add locale and formatting options to `localeDateString`, `localeString` and `localTimeString` functions https://github.com/rescript-association/rescript-core/pull/30
- Remove `Undefined` module. `Nullable` or `option` directly (where appropriate) can be used instead. https://github.com/rescript-association/rescript-core/pull/59
- Change `RegExp.source` to return a `string`. Was previously returning a `bool`, which is wrong. https://github.com/rescript-association/rescript-core/pull/47
- Remove `Date.valueOf` as it returns the same as `Date.getTime`. https://github.com/rescript-association/rescript-core/pull/61

Expand Down
15 changes: 0 additions & 15 deletions src/Core__Undefined.mjs

This file was deleted.

15 changes: 0 additions & 15 deletions src/Core__Undefined.res

This file was deleted.

75 changes: 0 additions & 75 deletions src/Core__Undefined.resi

This file was deleted.

3 changes: 0 additions & 3 deletions src/RescriptCore.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ var $$RegExp;

var $$String;

var Undefined;

var $$Symbol;

var Type;
Expand Down Expand Up @@ -112,7 +110,6 @@ export {
$$Promise ,
$$RegExp ,
$$String ,
Undefined ,
$$Symbol ,
Type ,
$$JSON ,
Expand Down
3 changes: 1 addition & 2 deletions src/RescriptCore.res
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ module Object = Core__Object
module Promise = Core__Promise
module RegExp = Core__RegExp
module String = Core__String
module Undefined = Core__Undefined
module Symbol = Core__Symbol
module Type = Core__Type
module JSON = Core__JSON
Expand Down Expand Up @@ -49,7 +48,7 @@ module Intl = Core__Intl
@val external globalThis: {..} = "globalThis"

external null: Core__Null.t<'a> = "#null"
external undefined: Core__Undefined.t<'a> = "#undefined"
external undefined: Core__Nullable.t<'a> = "#undefined"
external typeof: 'a => Core__Type.t = "#typeof"

type t<'a> = Js.t<'a>
Expand Down
5 changes: 1 addition & 4 deletions test/TempTests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import * as Core__Array from "../src/Core__Array.mjs";
import * as Core__Float from "../src/Core__Float.mjs";
import * as Core__BigInt from "../src/Core__BigInt.mjs";
import * as Core__Option from "../src/Core__Option.mjs";
import * as Core__Undefined from "../src/Core__Undefined.mjs";

console.info("");

Expand Down Expand Up @@ -311,8 +310,6 @@ var resolvedOptions = new Intl.DateTimeFormat().resolvedOptions();

var timeZone = resolvedOptions.timeZone;

var x$1 = Core__Undefined.fromOption(1);

var z = 1.2 % 1.4;

var intFromBigInt = Core__BigInt.toInt(BigInt("10000000000"));
Expand Down Expand Up @@ -350,11 +347,11 @@ export {
result$1 as result,
set ,
regexp ,
x ,
array$1 as array,
timeout ,
resolvedOptions ,
timeZone ,
x$1 as x,
z ,
intFromBigInt ,
Bugfix ,
Expand Down
2 changes: 0 additions & 2 deletions test/TempTests.res
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ if globalThis["hello"] !== undefined {
let resolvedOptions = Intl.DateTimeFormat.make()->Intl.DateTimeFormat.resolvedOptions
let timeZone = resolvedOptions["timeZone"]

let x = Some(1)->Undefined.fromOption

let z = Float.mod(1.2, 1.4)

let intFromBigInt = BigInt.fromString("10000000000")->BigInt.toInt
Expand Down