LSIF indexer for TypeScript and JavaScript.
yarn build
yarn linkCurrently, Node v14, Node v16 and Node v18 are supported.
Navigate to the project root, containing tsconfig.json.
yarn build
yarn link
lsif-typescript indexNavigate to the project root, containing package.json.
yarn build
yarn link
lsif-typescript index --infer-tsconfigTo improve the quality of indexing results for JavaScript,
consider adding @types/* packages as devDependencies in package.json.
Navigate to the project root, containing package.json.
yarn build
yarn unlink || true
yarn link
lsif-typescript index --yarn-workspaces # For Yarn v2
lsif-typescript index --yarn-berry-workspaces # For Yarn v3 (Berry)lsif-typescript index \
--explicit-ts-config-json="tsconfig.production.json"This method looks for all of the files that match the glob pattern, **/tsconfig*.json, except in node_modules directories, and then passes them as explicit tsconfig.json files. Note that the following arguments are ignored during this scenario: --explicit-ts-config-json and infer-tsconfig.
lsif-typescript index \
--explicit-implicit-loopWhen using the Docker image
GITHUB_REPO_PATH=""
REPO_MOUNT_DIR="/src"
LSIF_OUTPUT_DIRECTORY="test-sourcefield"
LSIF_DIR_IN_DOCKER="/test"
LSIF_FILE="index.lsif"
LATEST_BUILT_IMAGE="us-docker.pkg.dev/plumbr/source-field/sourcefield-lsif-typescript:62b533a"
# Get latest-built image from:
# https://console.cloud.google.com/artifacts/docker/plumbr/us/source-field/sourcefield-lsif-typescript?project=plumbr
docker \
run \
-v ${LSIF_OUTPUT_DIRECTORY}:${LSIF_DIR_IN_DOCKER} \
-v ${GITHUB_REPO_PATH}:${REPO_MOUNT_DIR} \
-w ${REPO_MOUNT_DIR} \
-it \
${LATEST_BUILT_IMAGE} \
lsif-typescript index --output ${LSIF_DIR_IN_DOCKER}/${LSIF_FILE} --explicit-implicit-loop