mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-24 13:09:07 +01:00
[iceshrimp-js] Build with tsc so we get type declarations
This commit is contained in:
parent
d4aef0b930
commit
7f58107311
@ -5,7 +5,7 @@
|
||||
"main": "./built/index.js",
|
||||
"types": "./built/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "swc src -d built -D",
|
||||
"build": "tsc",
|
||||
"build:debug": "swc src -d built -s -D",
|
||||
"render": "yarn build && yarn api && yarn api-prod && cp temp/iceshrimp-js.api.json etc/ && yarn api-doc",
|
||||
"tsd": "tsc && tsd",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Endpoints } from "./api.types";
|
||||
import { Endpoints } from "./api.types.js";
|
||||
|
||||
const MK_API_ERROR = Symbol();
|
||||
|
||||
|
@ -34,7 +34,7 @@ import {
|
||||
NoteReaction,
|
||||
Signin,
|
||||
MessagingMessage,
|
||||
} from "./entities";
|
||||
} from "./entities.js";
|
||||
|
||||
type TODO = Record<string, any> | null;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Endpoints } from "./api.types";
|
||||
import Stream, { Connection } from "./streaming";
|
||||
import { Channels } from "./streaming.types";
|
||||
import { Acct } from "./acct";
|
||||
import * as consts from "./consts";
|
||||
import { Endpoints } from "./api.types.js";
|
||||
import Stream, { Connection } from "./streaming.js";
|
||||
import { Channels } from "./streaming.types.js";
|
||||
import { Acct } from "./acct.js";
|
||||
import * as consts from "./consts.js";
|
||||
|
||||
export { Endpoints, Stream, Connection as ChannelConnection, Channels, Acct };
|
||||
|
||||
@ -14,6 +14,6 @@ export const ffVisibility = consts.ffVisibility;
|
||||
// api extractor not supported yet
|
||||
//export * as api from './api';
|
||||
//export * as entities from './entities';
|
||||
import * as api from "./api";
|
||||
import * as entities from "./entities";
|
||||
import * as api from "./api.js";
|
||||
import * as entities from "./entities.js";
|
||||
export { api, entities };
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { EventEmitter } from "eventemitter3";
|
||||
import ReconnectingWebsocket from "reconnecting-websocket";
|
||||
import { BroadcastEvents, Channels } from "./streaming.types";
|
||||
import { BroadcastEvents, Channels } from "./streaming.types.js";
|
||||
|
||||
function autobind(instance: any): void {
|
||||
const prototype = Object.getPrototypeOf(instance);
|
||||
|
@ -9,7 +9,7 @@ import type {
|
||||
PageEvent,
|
||||
User,
|
||||
UserGroup,
|
||||
} from "./entities";
|
||||
} from "./entities.js";
|
||||
|
||||
type FIXME = any;
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "es2020",
|
||||
"module": "commonjs",
|
||||
"target": "ES2022",
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true,
|
||||
@ -13,8 +14,20 @@
|
||||
"strictNullChecks": true,
|
||||
"experimentalDecorators": true,
|
||||
"noImplicitReturns": true,
|
||||
"esModuleInterop": true
|
||||
"esModuleInterop": true,
|
||||
"typeRoots": [
|
||||
"./node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "test/**/*"]
|
||||
"include": [
|
||||
"src/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"test/**/*"
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user