I'm using a project based of the Typescript-babel starter
open source reproduction: https://github.com/NullVoxPopuli/static-route-paths/blob/master/tests/index.ts#L57
(the actual code in this case)
$ yarn type-check
yarn run v1.15.2
$ tsc --noEmit
Done in 1.17s.
$ yarn build
yarn run v1.15.2
$ yarn build:types && yarn build:js
$ tsc --emitDeclarationOnly
$ babel src --out-dir dist --extensions ".ts"
Successfully compiled 3 files with Babel.
Done in 1.85s.
Hovering over tree.blogs.show (showing that there is a posts property)

finally, the error:
$ yarn test --grep "nested level of tokens"
yarn run v1.15.2
$ mocha --require ts-node/register --reporter spec tests/index.ts --grep 'nested level of tokens'
/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/ts-node/src/index.ts:240
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
tests/index.ts:57:40 - error TS2339: Property 'posts' does not exist on type 'Route'.
57 const result = tree.blogs.show.posts.show.with({
~~~~~
at createTSError (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/ts-node/src/index.ts:240:12)
at reportTSError (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/ts-node/src/index.ts:244:19)
at getOutput (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/ts-node/src/index.ts:360:34)
at Object.compile (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/ts-node/src/index.ts:393:11)
at Module.m._compile (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/ts-node/src/index.ts:439:43)
at Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Object.require.extensions.(anonymous function) [as .ts] (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/ts-node/src/index.ts:442:12)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at /home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/mocha/lib/mocha.js:330:36
at Array.forEach (<anonymous>)
at Mocha.loadFiles (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/mocha/lib/mocha.js:327:14)
at Mocha.run (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/mocha/lib/mocha.js:804:10)
at Object.exports.singleRun (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/mocha/lib/cli/run-helpers.js:207:16)
at exports.runMocha (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/mocha/lib/cli/run-helpers.js:300:13)
at Object.exports.handler.argv [as handler] (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/mocha/lib/cli/run.js:296:3)
at Object.runCommand (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/yargs/lib/command.js:242:26)
at Object.parseArgs [as _parseArgs] (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/yargs/yargs.js:1087:28)
at Object.parse (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/yargs/yargs.js:566:25)
at Object.exports.main (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/mocha/lib/cli/cli.js:63:6)
at Object.<anonymous> (/home/lprestonsegoiii/Development/NullVoxPopuli/static-route-paths/node_modules/mocha/bin/_mocha:10:23)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
{
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"target": "esnext",
"module": "commonjs",
"lib": ["es6", "dom"],
"declaration": true,
"strict": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"dist",
]
}
I'm using a project based of the Typescript-babel starter
open source reproduction: https://github.com/NullVoxPopuli/static-route-paths/blob/master/tests/index.ts#L57
(the actual code in this case)
$ yarn type-check yarn run v1.15.2 $ tsc --noEmit Done in 1.17s.Hovering over tree.blogs.show (showing that there is a posts property)

finally, the error: