Can you write a TypeScript function that parses paths and will pass the following tests?

```
expect(parsePath(""), []);
expect(parsePath("hello"), ["hello"]);
expect(parsePath("[]"), [null]);
expect(parsePath("hello[1]"), ["hello", 1]);
expect(parsePath("hello[]"), ["hello", null]);
expect(parsePath("hello[1][2][3]"), ["hello", 1, 2, 3]);
expect(parsePath("hello[world][foo][bar]"), ["hello", "world", "foo", "bar"]);
expect(parsePath("hello[world][3][foo][2][bar]"), [
  "hello",
  "world",
  3,
  "foo",
  2,
  "bar",
]);
expect(parsePath("hello.foo"), ["hello", "foo"]);
expect(parsePath("hello.foo.bar"), ["hello", "foo", "bar"]);
expect(parsePath("hello[].foo"), ["hello", null, "foo"]);
expect(parsePath("hello.foo.bar"), ["hello", "foo", "bar"]);
``` Provide exactly two different responses that are separated with 6 asterisk symbols: ******.
user