I'm creating a function like [Lodash's at()](https://lodash.com/docs/4.17.15#at). I have typing working if the user passes in tuples like this:

```
at(obj, ['key1'] as const, ['key2', 'key3'] as const)

```

I want the user to be able to call the function naturally, without tricks like "`as const`". Can it be done? Here is the craziness I have so far:

```
type PropertyAtPath<T, Path extends readonly any[]> = Path extends []
  ? T
  : Path extends readonly [infer First, ...infer Rest]
  ? First extends keyof T
    ? PropertyAtPath<T[First], Rest>
    : undefined
  : unknown;

type At<T, Paths extends ReadonlyArray<ReadonlyArray<any>>> = {
  [I in keyof Paths]: Paths[I] extends readonly any[]
    ? PropertyAtPath<T, Paths[I]>
    : never;
};

declare function at<T, Paths extends ReadonlyArray<ReadonlyArray<any>>>(
  object: T,
  ...paths: Paths
): At<T, Paths>;

```

[playground link](https://www.typescriptlang.org/play?#code/C4TwDgpgBACgTge0nUBBYMCGwAWAeAFQBpZscoIAPYCAOwBMBnKOCTehWgGxCk1pABtALoA+KAF5SuCtTpMoIgFBQoAfigEVUAFzTyVGg2at2nHooCWtAGYQ4UAGKW4jYCQB0X63YcAlCDdhbQ1nV2BZIwUAawgQBBtNbVUNeCR7NAwyQkEwoJIAt1Fk3SgAVwYIG2sIem09CujaBAB3WgBuJSVQSCh0QhIsXGZDeWYAs24QVDg4TBA8CY4pmbmF-hBRLckoAG9tQQBJKGsoWPjEoZxGYT0rxiPhSLGWNmWLDeVVFNhEZEyrgN9A9DmISnpaBAAG72ToAX06SnoEAAxlxMKwoDYKijgJZOHxgED7s9jFAluZprN5os3pTVjSNltRAAKbQIABGACtUcA9MRtF4PGAyIw7qKlABKPT9YjA0SIgD0ypVqtVXWsNDgNkwKOgAHk9tpMBCygBbDmw7QcmXUha7KAovRuODWADmUDhCqUcK6yLRGOgKM4bignK5en1iOwLPDJEEACJMAmnphmMHaG5Je0oMqoIwcAgylx6FBLYpaObLXAniyWgg4NF3ZKlDG44okyns7nFfnC8XS+XBJWLfZa80IvXG82um3ufGExyEyQAAwkBMolN8dMh4DdvMFoslsvQQQu921qdN2hultzrkLper9eb4T73uHgcnxTnm-jhCTg2163koQA)