-
Notifications
You must be signed in to change notification settings - Fork 0
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
next: Replace Slice
type with Iterable
type
#43
Labels
Comments
elycruz
added a commit
that referenced
this issue
Aug 6, 2021
…hods. Updated 'Slice' type to also include 'SliceInterface' type in it's type sum.
elycruz
added a commit
that referenced
this issue
Sep 30, 2021
elycruz
added a commit
that referenced
this issue
Aug 21, 2022
elycruz
added a commit
that referenced
this issue
Aug 22, 2022
elycruz
added a commit
that referenced
this issue
Aug 22, 2022
elycruz
added a commit
that referenced
this issue
Aug 22, 2022
elycruz
added a commit
that referenced
this issue
Aug 22, 2022
elycruz
added a commit
that referenced
this issue
Aug 22, 2022
elycruz
added a commit
that referenced
this issue
Aug 22, 2022
elycruz
added a commit
that referenced
this issue
Aug 23, 2022
elycruz
added a commit
that referenced
this issue
Aug 23, 2022
…mberIndexable<T>' instead of 'Slice<T>'. - Updated 'NumberIndexable' type to also contain 'Lengthable & {readonly [index in number]: string}' - enables this type to sit in place of 'string' type, where it makes sense (e.g., 'intersperse', and other methods).
elycruz
added a commit
that referenced
this issue
Aug 24, 2022
…e but instead treat incoming 'T[][]' as 'Slice<T>[]'. - Updated types in 'string' module's failing tests.
elycruz
added a commit
that referenced
this issue
Aug 24, 2022
- Simplified logic in 'insertBy' method. - Reversed some logic in 'intersect' method.
elycruz
added a commit
that referenced
this issue
Aug 24, 2022
…anagement/use of array types. - Updated 'map' implementation to only work with array types. - Updated 'map' tests.
elycruz
added a commit
that referenced
this issue
Aug 24, 2022
…anagement/use of array types. - Updated 'map' implementation to only work with array types. - Updated 'map' tests. - Also all [unstable] progress on updating 'map' method related methods is in progress - Types have to be updated for all these methods.
elycruz
added a commit
that referenced
this issue
Aug 26, 2022
…mberIndexable', where it made sense.
elycruz
added a commit
that referenced
this issue
Aug 26, 2022
…rk - The forward is to simplify the 'fjl/src/list/' methods to just work for array's, mixing and matching types is proving to be a major headache as the typescript compiler is now a bit stricter than it used to be - All array methods to only work on arrays from hear-on-out, unless we find a way to make them work seamlessly (without requiring typecasting all over the place) in all required scenarios (for TypedArray, string, and Array types, etc.).
elycruz
added a commit
that referenced
this issue
Aug 26, 2022
…onal-jslib/fjl into issue-#43-normalize_array_methods
elycruz
added a commit
that referenced
this issue
Aug 26, 2022
- Progress on changing array types, in 'src/fjl/list/' - Progress will now shift to make all 'list' methods work only with array types.
elycruz
added a commit
that referenced
this issue
Aug 26, 2022
…onal-jslib/fjl into issue-#43-normalize_array_methods
elycruz
added a commit
that referenced
this issue
Aug 26, 2022
…tils' to just accept pure array types. Cleaned up formatting in some tests.
elycruz
added a commit
that referenced
this issue
Aug 26, 2022
…s - most methods updated here, except ones where it made sense to keep the (Slice) type. - Progress on tests cleanup to 'green' state.
elycruz
added a commit
that referenced
this issue
Aug 27, 2022
elycruz
added a commit
that referenced
this issue
Aug 27, 2022
elycruz
added a commit
that referenced
this issue
Aug 27, 2022
elycruz
added a commit
that referenced
this issue
Aug 27, 2022
…hough modified to absolutely work for strings, arrays, or objects meeting the requirements - type need fine tweaking to match the intersected types' internals ('concat()', '[index: number]: ...', types etc.). - Progress on updating existing methods to have 'green' tests.
elycruz
added a commit
that referenced
this issue
Aug 27, 2022
elycruz
added a commit
that referenced
this issue
Aug 27, 2022
elycruz
added a commit
that referenced
this issue
Aug 27, 2022
elycruz
added a commit
that referenced
this issue
Aug 28, 2022
elycruz
added a commit
that referenced
this issue
Aug 28, 2022
elycruz
added a commit
that referenced
this issue
Aug 28, 2022
elycruz
added a commit
that referenced
this issue
Aug 28, 2022
elycruz
added a commit
that referenced
this issue
Jan 22, 2023
Sum
types in base typesSum
types in base types
Sum
types in base typesSlice
type with Iterable
type
Slice
type with Iterable
type Slice
type with Iterable
type
elycruz
added a commit
that referenced
this issue
Feb 28, 2024
Issue no longer required - We have found a way to continue using the |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Complex sum types cause more trouble than it is usually worth, in a low level library - Where ever we have to cast types, internally, means the same has to happen from the outside (in some cases) - for these case we should use simpler, atomic types.
Example case with casting issue:
A better approach to the
reverse
implementation is to only acceptIterable<T>, return
T[], and allow the user to decide how to get their string into the method, and alternately supply a
reverseStr` method if the method is really required for strings etc..Acceptance Criteria
Iterable<T>
type.The text was updated successfully, but these errors were encountered: