change publish logic.

This commit is contained in:
lchen committed 2026-10-23 16:01:31 +08:00
1 parent 27623a4e93
commit ce2fa6eec7
6 files changed
+23 -13

No files matched your search

+1 -4
View File
@@ -1,4 +1 @@
interface DetailItem {
id: number;
name: string;
}

+1 -3
View File
@@ -1,6 +1,4 @@
/// <reference path="./global.d.ts" />
export interface ApiSuccess<T> {
export interface ApiSuccess<T> {
errorCode: 0;
result: T;
tag?: unknown;
+7 -1
View File
@@ -1,7 +1,13 @@
import { ApiError, fetchApi } from './helper';
const container = document.querySelector('#main');
declare global {
interface DetailItem {
id: number;
name: string;
}
}
const container = document.querySelector('#main');
if (container) {
try {
const detail = await fetchApi<DetailItem>('api/detail?id=11');
@@ -12,5 +12,3 @@ if (errorContainer instanceof HTMLElement) {
const err = window.__SERVER_DATA__;
errorContainer.innerText = `${err.errorCode}: ${err.errorMessage}`;
}
export { }
+2
View File
@@ -4,7 +4,9 @@
"vite.config.ts"
],
"compilerOptions": {
"lib": ["dom", "ES2015"],
"types": [ "node" ],
"skipLibCheck": true,
"module": "esnext",
"moduleResolution": "bundler"
}