This repository has been archived on 2026-05-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
novarix-networks-homepage/node_modules/next/dist/build/analysis/extract-const-value.d.ts
T
Kismet Hasanaj 34dc9aec52 .
2026-05-02 20:07:02 +02:00

24 lines
775 B
TypeScript

import type { Module } from '@swc/core';
export type ExtractValueResult = {
value: any;
} | {
unsupported: string;
path?: string;
};
/**
* Extracts the value of an exported const variable named `exportedName`
* (e.g. "export const config = { runtime: 'edge' }") from swc's AST.
* The value must be one of (or returns unsupported):
* - string
* - boolean
* - number
* - null
* - undefined
* - array containing values listed in this list
* - object containing values listed in this list
*
* Returns null if the declaration is not found.
* Returns { unsupported, path? } if the value contains unsupported nodes.
*/
export declare function extractExportedConstValue(module: Module | null, exportedName: string): ExtractValueResult | null;