archunit
Version:
ArchUnit TypeScript is an architecture testing library, to specify and assert architecture rules in your TypeScript app
17 lines (16 loc) • 1.27 kB
TypeScript
import ts from 'typescript';
import { ImportKind } from './import-kinds';
/**
*
*
* | `ImportKind` | Example | Explanation |
* | ------------- | ---------------------------------------------- | -------------------------------------------------------------- |
* | `VALUE` | `import { something } from './module';` | A runtime import (default behavior if not `type`). |
* | `TYPE` | `import type { SomeType } from './types';` | A compile-time-only import (used for TypeScript types). |
* | `DEFAULT` | `import React from 'react';` | A default import—grabs the default export from the module. |
* | `NAMED` | `import { useState, useEffect } from 'react';` | Named imports—specific exported bindings. |
* | `NAMESPACE` | `import * as React from 'react';` | Namespace import—imports the entire module as an object. |
* | `SIDE_EFFECT` | `import './setupGlobals';` | Side-effect-only import—executes the module but binds nothing. |
*
*/
export declare const determineImportKinds: (x: ts.ImportDeclaration) => ImportKind[];