-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed node nullability and custom mutators
- Loading branch information
1 parent
fc69ef6
commit a2d90bf
Showing
26 changed files
with
242 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
(function() { | ||
(function () { | ||
console.log("Hello, world!"); | ||
|
||
function ignoreChanges(): string { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
(function () { | ||
/* foo */ (function () { | ||
console.log("Hello, world!"); | ||
|
||
function ignoreChanges(): string { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
(function () { | ||
/* 2 */ /* 1 */ (function () { | ||
console.log("Hello, world!"); | ||
|
||
function ignoreChanges(): string { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,60 @@ | ||
(function () { | ||
// Inferable literals | ||
const inferableBoolean = (input = false) => { }; | ||
const inferableNull = (input = null) => { }; | ||
const inferableNumber = (input = 0) => { }; | ||
const inferableRegExp = (input = /./) => { }; | ||
const inferableString = (input = "") => { }; | ||
const inferableUndefined = (input = undefined) => { }; | ||
const inferableBoolean = (input = false) => {}; | ||
const inferableNull = (input = null) => {}; | ||
const inferableNumber = (input = 0) => {}; | ||
const inferableRegExp = (input = /./) => {}; | ||
const inferableString = (input = "") => {}; | ||
const inferableUndefined = (input = undefined) => {}; | ||
|
||
// Inferable arrays | ||
const inferableBooleans = (input = [false]) => { }; | ||
const inferableNulls = (input = [null]) => { }; | ||
const inferableNumbers = (input = [0]) => { }; | ||
const inferableRegExps = (input = [/./]) => { }; | ||
const inferableStrings = (input = [""]) => { }; | ||
const inferableUndefineds = (input = [undefined]) => { }; | ||
const inferableBooleans = (input = [false]) => {}; | ||
const inferableNulls = (input = [null]) => {}; | ||
const inferableNumbers = (input = [0]) => {}; | ||
const inferableRegExps = (input = [/./]) => {}; | ||
const inferableStrings = (input = [""]) => {}; | ||
const inferableUndefineds = (input = [undefined]) => {}; | ||
|
||
// Inferable multi-type arrays | ||
const inferableNullOrStrings = (input = [null, ""]) => { }; | ||
const inferableNumberOrRegExps = (input = [0, /./]) => { }; | ||
const inferableNullOrStrings = (input = [null, ""]) => {}; | ||
const inferableNumberOrRegExps = ( | ||
input = [0, /./], | ||
) => {}; | ||
|
||
// Non-inferable multi-type arrays | ||
const nonInferableNullOrStrings = (input: (null | string)[] = [null]) => { }; | ||
const nonInferableNumberOrRegExps = (input: (number | RegExp)[] = [0]) => { }; | ||
|
||
const nonInferableNullOrStrings = (input: (null | string)[] = [null]) => {}; | ||
const nonInferableNumberOrRegExps = (input: (number | RegExp)[] = [0]) => {}; | ||
|
||
// Class instances | ||
|
||
class Parent { parent = true; } | ||
class Child extends Parent { child = true; } | ||
class Parent { | ||
parent = true; | ||
} | ||
class Child extends Parent { | ||
child = true; | ||
} | ||
|
||
// Inferable direct class instances | ||
const takesParent = (parent = new Parent()) => { }; | ||
const takesChild = (child = new Child()) => { }; | ||
const takesParent = (parent = new Parent()) => {}; | ||
const takesChild = (child = new Child()) => {}; | ||
|
||
// Non-inferable direct class instances | ||
const takesParentAsChild = (child: Parent = new Child()) => { }; | ||
const takesParentAsChild = (child: Parent = new Child()) => {}; | ||
|
||
// Non-inferable union class instances | ||
const takesParentOrChildAsParent = (either: Parent | Child = new Parent()) => { }; | ||
const takesParentOrChildAsChild = (either: Parent | Child = new Child()) => { }; | ||
const takesParentOrUndefinedAsParent = (child: Parent | undefined = new Parent()) => { }; | ||
const takesParentOrUndefinedAsChild = (child: Parent | undefined = new Child()) => { }; | ||
const takesChildOrUndefinedAsChild = (child: Child | undefined = new Child()) => { }; | ||
})(); | ||
const takesParentOrChildAsParent = ( | ||
either: Parent | Child = new Parent(), | ||
) => {}; | ||
const takesParentOrChildAsChild = ( | ||
either: Parent | Child = new Child(), | ||
) => {}; | ||
const takesParentOrUndefinedAsParent = ( | ||
child: Parent | undefined = new Parent(), | ||
) => {}; | ||
const takesParentOrUndefinedAsChild = ( | ||
child: Parent | undefined = new Child(), | ||
) => {}; | ||
const takesChildOrUndefinedAsChild = ( | ||
child: Child | undefined = new Child(), | ||
) => {}; | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,60 @@ | ||
(function () { | ||
// Inferable literals | ||
const inferableBoolean = (input = false) => { }; | ||
const inferableNull = (input = null) => { }; | ||
const inferableNumber = (input = 0) => { }; | ||
const inferableRegExp = (input = /./) => { }; | ||
const inferableString = (input = "") => { }; | ||
const inferableUndefined = (input = undefined) => { }; | ||
const inferableBoolean = (input = false) => {}; | ||
const inferableNull = (input = null) => {}; | ||
const inferableNumber = (input = 0) => {}; | ||
const inferableRegExp = (input = /./) => {}; | ||
const inferableString = (input = "") => {}; | ||
const inferableUndefined = (input = undefined) => {}; | ||
|
||
// Inferable arrays | ||
const inferableBooleans = (input = [false]) => { }; | ||
const inferableNulls = (input = [null]) => { }; | ||
const inferableNumbers = (input = [0]) => { }; | ||
const inferableRegExps = (input = [/./]) => { }; | ||
const inferableStrings = (input = [""]) => { }; | ||
const inferableUndefineds = (input = [undefined]) => { }; | ||
const inferableBooleans = (input = [false]) => {}; | ||
const inferableNulls = (input = [null]) => {}; | ||
const inferableNumbers = (input = [0]) => {}; | ||
const inferableRegExps = (input = [/./]) => {}; | ||
const inferableStrings = (input = [""]) => {}; | ||
const inferableUndefineds = (input = [undefined]) => {}; | ||
|
||
// Inferable multi-type arrays | ||
const inferableNullOrStrings = (input = [null, ""]) => { }; | ||
const inferableNumberOrRegExps = (input = [0, /./]) => { }; | ||
const inferableNullOrStrings = (input = [null, ""]) => {}; | ||
const inferableNumberOrRegExps = ( | ||
input = [0, /./], | ||
) => {}; | ||
|
||
// Non-inferable multi-type arrays | ||
const nonInferableNullOrStrings = (input: (null | string)[] = [null]) => { }; | ||
const nonInferableNumberOrRegExps = (input: (number | RegExp)[] = [0]) => { }; | ||
|
||
const nonInferableNullOrStrings = (input: (null | string)[] = [null]) => {}; | ||
const nonInferableNumberOrRegExps = (input: (number | RegExp)[] = [0]) => {}; | ||
|
||
// Class instances | ||
|
||
class Parent { parent = true; } | ||
class Child extends Parent { child = true; } | ||
class Parent { | ||
parent = true; | ||
} | ||
class Child extends Parent { | ||
child = true; | ||
} | ||
|
||
// Inferable direct class instances | ||
const takesParent = (parent = new Parent()) => { }; | ||
const takesChild = (child = new Child()) => { }; | ||
const takesParent = (parent = new Parent()) => {}; | ||
const takesChild = (child = new Child()) => {}; | ||
|
||
// Non-inferable direct class instances | ||
const takesParentAsChild = (child: Parent = new Child()) => { }; | ||
const takesParentAsChild = (child: Parent = new Child()) => {}; | ||
|
||
// Non-inferable union class instances | ||
const takesParentOrChildAsParent = (either: Parent | Child = new Parent()) => { }; | ||
const takesParentOrChildAsChild = (either: Parent | Child = new Child()) => { }; | ||
const takesParentOrUndefinedAsParent = (child: Parent | undefined = new Parent()) => { }; | ||
const takesParentOrUndefinedAsChild = (child: Parent | undefined = new Child()) => { }; | ||
const takesChildOrUndefinedAsChild = (child: Child | undefined = new Child()) => { }; | ||
})(); | ||
const takesParentOrChildAsParent = ( | ||
either: Parent | Child = new Parent(), | ||
) => {}; | ||
const takesParentOrChildAsChild = ( | ||
either: Parent | Child = new Child(), | ||
) => {}; | ||
const takesParentOrUndefinedAsParent = ( | ||
child: Parent | undefined = new Parent(), | ||
) => {}; | ||
const takesParentOrUndefinedAsChild = ( | ||
child: Parent | undefined = new Child(), | ||
) => {}; | ||
const takesChildOrUndefinedAsChild = ( | ||
child: Child | undefined = new Child(), | ||
) => {}; | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.