Skip to main content
Module

x/ts_morph/ts_morph.d.ts>Project#addDirectoryAtPathIfExists

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method Project.prototype.addDirectoryAtPathIfExists
import { Project } from "https://deno.land/x/ts_morph@15.1.0/ts_morph.d.ts";

Adds an existing directory from the path or returns undefined if it doesn't exist.

Will return the directory if it was already added.

Parameters

dirPath: string
  • Path to add the directory at.
optional
options: DirectoryAddOptions
  • Options.

Returns

Directory | undefined