From c7376a6af8ade3d7b9606ee6003eb6a2a029c878 Mon Sep 17 00:00:00 2001 From: "Xc@centOs" Date: Fri, 15 Sep 2023 09:48:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=BA=86=E5=AF=B9react-scrip?= =?UTF-8?q?ts=E7=9A=84=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/index.d.ts | 1 + es/index.js | 1 + lib/index.d.ts | 1 + lib/index.js | 1 + package.json | 1 - src/index.ts | 1 - typings/react.d.ts | 81 +++++++++++++++++++++++++++++++++++++++++++--- 7 files changed, 80 insertions(+), 7 deletions(-) diff --git a/es/index.d.ts b/es/index.d.ts index 3f83fb3a..c1f1f8b3 100644 --- a/es/index.d.ts +++ b/es/index.d.ts @@ -1,3 +1,4 @@ +/// export type { BasicFeatures } from './features'; export { Cache } from './features/cache'; export { LocalStorage } from './features/localStorage'; diff --git a/es/index.js b/es/index.js index 4c98d12b..703cdbf4 100644 --- a/es/index.js +++ b/es/index.js @@ -1,3 +1,4 @@ +/// export { Cache } from './features/cache'; export { LocalStorage } from './features/localStorage'; export * from './types/Feature'; diff --git a/lib/index.d.ts b/lib/index.d.ts index 3f83fb3a..c1f1f8b3 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,3 +1,4 @@ +/// export type { BasicFeatures } from './features'; export { Cache } from './features/cache'; export { LocalStorage } from './features/localStorage'; diff --git a/lib/index.js b/lib/index.js index 109aa2f1..3109cc4b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,5 @@ "use strict"; +/// Object.defineProperty(exports, "__esModule", { value: true }); exports.DebugStore = exports.SyncTriggerExecutor = exports.CacheStore = exports.LocalStorage = exports.Cache = void 0; var tslib_1 = require("tslib"); diff --git a/package.json b/package.json index e52a9060..d27653b9 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "oak-memory-tree-store": "file:../oak-memory-tree-store", "ol": "^7.3.0", "react-responsive": "^9.0.2", - "react-scripts": "^5.0.1", "rmc-pull-to-refresh": "^1.0.13", "socket.io-client": "^4.7.2", "url": "^0.11.0", diff --git a/src/index.ts b/src/index.ts index 1776e677..fa32b3c1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,3 @@ - export type { BasicFeatures } from './features'; export { Cache } from './features/cache'; export { LocalStorage } from './features/localStorage'; diff --git a/typings/react.d.ts b/typings/react.d.ts index 0eefb14c..13cc5f2d 100644 --- a/typings/react.d.ts +++ b/typings/react.d.ts @@ -1,8 +1,79 @@ -/// +/// +/// +/// + +declare namespace NodeJS { + interface ProcessEnv { + readonly NODE_ENV: 'development' | 'production' | 'test'; + readonly PUBLIC_URL: string; + } +} + +declare module '*.avif' { + const src: string; + export default src; +} + +declare module '*.bmp' { + const src: string; + export default src; +} + +declare module '*.gif' { + const src: string; + export default src; +} + +declare module '*.jpg' { + const src: string; + export default src; +} + +declare module '*.jpeg' { + const src: string; + export default src; +} + +declare module '*.png' { + const src: string; + export default src; +} + +declare module '*.webp' { + const src: string; + export default src; +} + +declare module '*.svg' { + import * as React from 'react'; + + export const ReactComponent: React.FunctionComponent & { title?: string }>; + + const src: string; + export default src; +} + +declare module '*.module.css' { + const classes: { readonly [key: string]: string }; + export default classes; +} + +declare module '*.module.scss' { + const classes: { readonly [key: string]: string }; + export default classes; +} + +declare module '*.module.sass' { + const classes: { readonly [key: string]: string }; + export default classes; +} + declare module '*.module.less' { - const classes: { - readonly [key: string]: string; - }; - export default classes; + const classes: { + readonly [key: string]: string; + }; + export default classes; }