import { ElementType } from 'react'; import { types as t, TransformOptions } from '@babel/core'; import { NodePath } from '@babel/traverse'; export declare type JSONValue = string | number | boolean | JSONObject | JSONArray; export interface JSONObject { [x: string]: JSONValue; } export interface JSONArray extends Array { } export declare type Serializable = JSONArray | JSONObject; export declare type Styled = ElementType & { __linaria: { className: string; extends: ElementType | Styled; }; }; export declare enum ValueType { LAZY = 0, FUNCTION = 1, VALUE = 2 } export declare type Value = Function | Styled | string | number; export declare type ValueCache = Map; export declare type LazyValue = { kind: ValueType.LAZY; ex: NodePath | t.Expression | string; }; export declare type FunctionValue = { kind: ValueType.FUNCTION; ex: any; }; export declare type EvaluatedValue = { kind: ValueType.VALUE; value: Value; }; export declare type ExpressionValue = LazyValue | FunctionValue | EvaluatedValue; export declare type TemplateExpression = { styled?: { component: any; }; path: NodePath; expressionValues: ExpressionValue[]; isGlobal: boolean; }; export declare type State = { queue: TemplateExpression[]; rules: { [selector: string]: { className: string; displayName: string; cssText: string; start: Location | null | undefined; isGlobal: boolean; }; }; replacements: Array<{ original: { start: Location; end: Location; }; length: number; }>; index: number; dependencies: string[]; file: { opts: { cwd: string; root: string; filename: string; }; metadata: any; }; }; export declare type StrictOptions = { displayName: boolean; evaluate: boolean; ignore: RegExp; prefix: string; suffix: string; optimize: boolean; babelOptions: TransformOptions; }; export declare type Location = { line: number; column: number; }; declare type AllNodes = { [T in t.Node['type']]: Extract; }; declare module '@babel/core' { namespace types { type VisitorKeys = { [T in keyof AllNodes]: Extract; }; const VISITOR_KEYS: { [T in keyof VisitorKeys]: VisitorKeys[T][]; }; const FLIPPED_ALIAS_KEYS: { [T in keyof t.Aliases]: t.Aliases[T]['type'][]; }; function shallowEqual(actual: object, expected: object): boolean; } } export {};