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

compile errors on typescript 5.4.4 #255

Open
DetachHead opened this issue Apr 10, 2024 · 0 comments
Open

compile errors on typescript 5.4.4 #255

DetachHead opened this issue Apr 10, 2024 · 0 comments

Comments

@DetachHead
Copy link
Owner

node_modules/@detachhead/ts-helpers/dist/types/Array.d.ts:90:254 - error TS2344: Type 'IndexOfLongestString<Array>' does not satisfy the constraint 'Index<Array>'.
  Type 'number | undefined' is not assignable to type 'Index<Array>'.
    Type 'undefined' is not assignable to type 'Index<Array>'.

90 type SortLongestStringsTailRec<Array extends readonly string[], Result extends string[]> = Or<Extends<Array, TupleOfUpTo<string, 1>> | Extends<number, Array['length']>> extends true ? [...Result, ...Array] : SortLongestStringsTailRec<RemoveIndex<Array, IndexOfLongestString<Array>>, [
   
                                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@detachhead/ts-helpers/dist/types/Array.d.ts:90:284 - error TS2344: Type '[...Result, Array[IndexOfLongestString<Array>]]' does not satisfy the constraint 'string[]'.
  Type 'Array[IndexOfLongestString<Array>] | Result[number]' is not assignable to type 'string'.
    Type 'Array[IndexOfLongestString<Array>]' is not assignable to type 'string'.
      Type 'Array[undefined] | Array[number]' is not assignable to type 'string'.
        Type 'Array[undefined]' is not assignable to type 'string'.

90 type SortLongestStringsTailRec<Array extends readonly string[], Result extends string[]> = Or<Extends<Array, TupleOfUpTo<string, 1>> | Extends<number, Array['length']>> extends true ? [...Result, ...Array] : SortLongestStringsTailRec<RemoveIndex<Array, IndexOfLongestString<Array>>, [
   
                                                                                          ~
91     ...Result,
   ~~~~~~~~~~~~~~
92     Array[IndexOfLongestString<Array>]
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93 ]>;
   ~

node_modules/@detachhead/ts-helpers/dist/types/Array.d.ts:92:5 - error TS2536: Type 'IndexOfLongestString<Array>' cannot be used to index type 'Array'.

92     Array[IndexOfLongestString<Array>]
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@detachhead/ts-helpers/dist/types/String.d.ts:183:1 - error TS2578: Unused '@ts-expect-error' directive.

183 /** @ts-expect-error -- TODO: figure out what causes this, its a stack depth error which is apparently very dangerous to suppress */
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@detachhead/ts-helpers/dist/types/String.d.ts:200:53 - error TS2536: Type 'IndexOfLongestString<ListOf<Strings>>' cannot be used to index type 'ListOf<Strings>'.

200 export type LongestString<Strings extends string> = ListOf<Strings>[IndexOfLongestString<ListOf<Strings>>];
                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 5 errors in 2 files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant