import { FeatureContext } from './feature'; import type { ImportSymbol } from './st-import'; import type { VarSymbol } from './st-var'; import type { ClassSymbol } from './css-class'; import type { ElementSymbol } from './css-type'; import type { CSSVarSymbol } from './css-custom-property'; import type { KeyframesSymbol } from './css-keyframes'; import type { LayerSymbol } from './css-layer'; import type { ContainerSymbol } from './css-contains'; import type { StylableMeta } from '../stylable-meta'; import type * as postcss from 'postcss'; export type StylableSymbol = ImportSymbol | VarSymbol | ClassSymbol | ElementSymbol | CSSVarSymbol | KeyframesSymbol | LayerSymbol | ContainerSymbol; declare const NAMESPACES: { readonly import: "main"; readonly class: "main"; readonly cssVar: "main"; readonly element: "main"; readonly keyframes: "keyframes"; readonly layer: "layer"; readonly container: "container"; readonly var: "main"; }; export declare const readableTypeMap: Record; type SymbolTypes = StylableSymbol['_kind']; type filterSymbols = Extract; type SymbolMap = { [K in SymbolTypes]: filterSymbols; }; type SymbolTypeToNamespace = typeof NAMESPACES; type FilterByNamespace = T extends any ? SymbolTypeToNamespace[T] extends NS ? T : never : never; type NamespaceToSymbolType = { [NS in SymbolTypeToNamespace[SymbolTypes]]: FilterByNamespace; }; export type Namespaces = keyof NamespaceToSymbolType; export type SymbolByNamespace = Extract; interface SymbolDeclaration { name: string; symbol: filterSymbols; ast: postcss.Node | undefined; safeRedeclare: boolean; } interface State { byNS: { [NS in Namespaces]: SymbolDeclaration[]; }; byNSFlat: { [NS in Namespaces]: Record>; }; byType: { [T in keyof SymbolMap]: Record; }; symbolToAst: WeakMap; } export declare const diagnostics: { REDECLARE_SYMBOL: { (name: string): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; REDECLARE_ROOT: { (): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; }; export declare const hooks: import("./feature").FeatureHooks; export declare function get(meta: StylableMeta, name: string, type?: T): filterSymbols | undefined; export declare function getAll(meta: StylableMeta, ns?: NS): { layer: Record; container: Record; keyframes: Record; main: Record>; }[NS]; export declare function getAllByType(meta: StylableMeta, type: T): State['byType'][T]; export declare function addSymbol({ context, symbol, node, safeRedeclare, localName, }: { context: FeatureContext; symbol: StylableSymbol; node?: postcss.Node; safeRedeclare?: boolean; localName?: string; }): StylableSymbol | undefined; export declare function getSymbolAstNode(meta: StylableMeta, symbol: StylableSymbol): postcss.Node | undefined; export declare function reportRedeclare(context: FeatureContext): void; export {}; //# sourceMappingURL=st-symbol.d.ts.map