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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

F.AutoPath not working for array index #246

Closed
nandorojo opened this issue Jul 8, 2021 · 1 comment
Closed

F.AutoPath not working for array index #246

nandorojo opened this issue Jul 8, 2021 · 1 comment
Labels
wontfix This will not be worked on

Comments

@nandorojo
Copy link

馃悶 Bug Report

Describe the bug

I get an error if I use an array index.

Reproduce the bug

import { F } from 'ts-toolbelt'
 
type Obj = {
    hi: boolean[]
}

declare function get<Obj extends object, Path extends string>(o: Obj, path: F.AutoPath<Obj, Path>): Path

const gotten = get({} as Obj, 'hi.0')

Code: https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgMTgXzgMyhEcDkMAzgLQwQQA2ARgKaUz4BQcTMAnmLXAPLUBWcALyIWccQAtgALjjUKlWgEMAdgG0AukzRMmAE1oBjSkqjdMAVxWGYwCCrgBzWjAA8fQbQAeMWir1EvAJGMAA0cAAKSjAScN6+-oFEMFDAKo4AfAAUELIe4WDRErLIAHQAghbkUTHuAuE1EhkAlLKNuob2yU4QMAnCTi5ZCBhKgfkEUqUADPjNQA

Expected behavior

It should work for arrays, like the docs.

Possible Solution

Screenshots

Screen Shot 2021-07-07 at 11 15 15 PM

Additional context

@stale
Copy link

stale bot commented Sep 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 6, 2021
@stale stale bot closed this as completed Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant