首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TypeScript错误:(TS1128)预期声明或语句

TypeScript错误:(TS1128)预期声明或语句
EN

Stack Overflow用户
提问于 2020-12-09 08:48:30
回答 1查看 2.2K关注 0票数 0

我有一个预期的TypeScript错误TS1128:声明或语句。我花了好几个小时却找不到错误..。它在master/node_modules/@theme-ui/core/dist/index.d.ts (4,1)中:

代码语言:javascript
复制
import * as React from 'react';
import './react-jsx';
export type { CSSObject, CSSOthersObject, CSSProperties, CSSPseudoSelectorProps, ColorMode, ColorModesScale, Label, ResponsiveStyleValue, Scale, StylePropertyValue, TLengthStyledSystem, Theme, ThemeDerivedStyles, ThemeStyles, ThemeUICSSObject, ThemeUICSSProperties, ThemeUIExtendedCSSProperties, ThemeUIStyleObject, VariantProperty, } from '@theme-ui/css';
export * from './types';
export declare const jsx: typeof React.createElement;
export interface ContextValue {
    __EMOTION_VERSION__: string;
    theme: Theme;
}
export declare const Context: React.Context<ContextValue>;
export declare const useThemeUI: () => ContextValue;
/**
 * Deeply merge themes
 */
export declare const merge: {
    (a: Theme, b: Theme): Theme;
    all: typeof mergeAll;
}
declare function mergeAll<A, B>(a: A, B: B): A & B;
declare function mergeAll<A, B, C>(a: A, B: B, c: C): A & B & C;
declare function mergeAll<A, B, C, D>(a: A, B: B, c: C, d: D): A & B & C & D;
interface BaseProviderProps {
    context: ContextValue;
}
export interface ThemeProviderProps {
    theme: Theme | ((outerTheme: Theme) => Theme);
    children?: React.ReactNode;
}
export declare function ThemeProvider({ theme, children }: ThemeProviderProps): React.FunctionComponentElement<BaseProviderProps>;
EN

回答 1

Stack Overflow用户

发布于 2022-02-19 13:00:23

试着在下面这样做:

代码语言:javascript
复制
 npm uninstall -g typescript
 npm install typescript --save-dev
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65213403

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档