• Version 0.2.0
  • Published
  • 4.83 kB
  • No dependencies
  • MIT license


npm i @types/tmp
yarn add @types/tmp
pnpm add @types/tmp


TypeScript definitions for tmp



variable tmpdir

const tmpdir: string;


    function dir

    dir: { (options: DirOptions, cb: DirCallback): void; (cb: DirCallback): void };

      function dirSync

      dirSync: (options?: DirOptions) => DirResult;

        function file

        file: {
        (options: FileOptions, cb: FileCallback): void;
        (cb: FileCallback): void;

          function fileSync

          fileSync: (options?: FileOptions) => FileResult;

            function setGracefulCleanup

            setGracefulCleanup: () => void;

              function tmpName

              tmpName: {
              (options: TmpNameOptions, cb: TmpNameCallback): void;
              (cb: TmpNameCallback): void;

                function tmpNameSync

                tmpNameSync: (options?: TmpNameOptions) => string;


                  interface DirOptions

                  interface DirOptions extends TmpNameOptions {}

                    property keep

                    keep?: boolean;

                      property mode

                      mode?: number;

                        property unsafeCleanup

                        unsafeCleanup?: boolean;

                          interface DirResult

                          interface DirResult {}

                            property name

                            name: string;

                              property removeCallback

                              removeCallback: () => void;

                                interface FileOptions

                                interface FileOptions extends TmpNameOptions {}

                                  property detachDescriptor

                                  detachDescriptor?: boolean;

                                    property discardDescriptor

                                    discardDescriptor?: boolean;

                                      property keep

                                      keep?: boolean;

                                        property mode

                                        mode?: number;

                                          interface FileResult

                                          interface FileResult {}

                                            property fd

                                            fd: number;

                                              property name

                                              name: string;

                                                property removeCallback

                                                removeCallback: () => void;

                                                  interface TmpNameOptions

                                                  interface TmpNameOptions {}

                                                    property dir

                                                    dir?: string;

                                                      property name

                                                      name?: string;

                                                        property postfix

                                                        postfix?: string;

                                                          property prefix

                                                          prefix?: string;

                                                            property template

                                                            template?: string;

                                                              property tmpdir

                                                              tmpdir?: string;

                                                                property tries

                                                                tries?: number;

                                                                  Type Aliases

                                                                  type DirCallback

                                                                  type DirCallback = (
                                                                  err: Error | null,
                                                                  name: string,
                                                                  removeCallback: () => void
                                                                  ) => void;

                                                                    type FileCallback

                                                                    type FileCallback = (
                                                                    err: Error | null,
                                                                    name: string,
                                                                    fd: number,
                                                                    removeCallback: () => void
                                                                    ) => void;

                                                                      type TmpNameCallback

                                                                      type TmpNameCallback = (err: Error | null, name: string) => void;

                                                                        Package Files (1)

                                                                        Dependencies (0)

                                                                        No dependencies.

                                                                        Dev Dependencies (0)

                                                                        No dev dependencies.

                                                                        Peer Dependencies (0)

                                                                        No peer dependencies.


                                                                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/tmp.

                                                                        • Markdown
                                                                        • HTML
                                                                          <a href="https://www.jsdocs.io/package/@types/tmp"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>