mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: base work
This commit is contained in:
1 parent
4e170f2917
commit
4a20102de3
9 files changed
+42
No files matched your search
@@ -0,0 +1 @@
|
||||
abstract class AbstractAPI {}
|
||||
@@ -0,0 +1 @@
|
||||
export class ClientAPI extends AbstractAPI {}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { ClientAPI } from "./client";
|
||||
import { ServerAPI } from "./server";
|
||||
|
||||
let dynamicAPI: AbstractAPI;
|
||||
|
||||
if (typeof window === "undefined") {
|
||||
dynamicAPI = new ServerAPI();
|
||||
} else {
|
||||
dynamicAPI = new ClientAPI();
|
||||
}
|
||||
|
||||
export const api = dynamicAPI;
|
||||
@@ -0,0 +1 @@
|
||||
export class ServerAPI extends AbstractAPI {}
|
||||
Reference in new issue
Block a user