Skip to content

Commit f14fab4

Browse files
committed
ts: lib/config/environment.js
1 parent e0cca6b commit f14fab4

2 files changed

Lines changed: 28 additions & 3 deletions

File tree

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
'use strict'
1+
import {toArrayConfig, toBooleanConfig, toIntegerConfig} from "./utils";
22

3-
const { toBooleanConfig, toArrayConfig, toIntegerConfig } = require('./utils')
43

5-
module.exports = {
4+
const environmentConfig = {
65
sourceURL: process.env.CMD_SOURCE_URL,
76
domain: process.env.CMD_DOMAIN,
87
urlPath: process.env.CMD_URL_PATH,
@@ -151,3 +150,5 @@ module.exports = {
151150
autoVersionCheck: toBooleanConfig(process.env.CMD_AUTO_VERSION_CHECK),
152151
defaultTocDepth: toIntegerConfig(process.env.CMD_DEFAULT_TOC_DEPTH)
153152
}
153+
154+
export = environmentConfig

typings/lutim/index.d.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
export = lutim
2+
declare global {
3+
namespace lutim {
4+
function setApiUrl(url: object)
5+
6+
function getApiUrl(): string
7+
8+
function getServerInfos(): Promise<any>
9+
10+
function uploadImage(filePath: string, deleteDay?: number, firstView?: number, keepExif?: number, crypt?: number): Promise<any>
11+
12+
function deleteImage(realShort: String, token: String): Promise<any>
13+
14+
function modifyImage(realShort: String, token: String, deleteDay: number, firstView?: number): Promise<any>
15+
16+
function getImage(short: String): Promise<any>
17+
18+
function getImageInfos(real_short: String): Promise<any>
19+
20+
function getImageCountAndStatus(short: String, token: String): Promise<any>
21+
22+
}
23+
}
24+

0 commit comments

Comments
 (0)