This repository was archived by the owner on Mar 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added typescript type declarations & typescript support
- Loading branch information
Showing
9 changed files
with
143 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,6 @@ module.exports = { | |
sourceType: 'module' | ||
}, | ||
rules: { | ||
} | ||
}, | ||
ignorePatterns: ['*.d.ts'] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,3 +117,6 @@ dist | |
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
# Jetbrains IDE | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,21 @@ | |
"main": "src/index.js", | ||
"author": "Seia-Soto <[email protected]>", | ||
"license": "MIT", | ||
"types": "src/index.d.ts", | ||
"scripts": { | ||
"example": "node example", | ||
"profile": "node scripts/profile" | ||
}, | ||
"devDependencies": { | ||
"@types/node-fetch": "^2.5.8", | ||
"babel-eslint": "^10.1.0", | ||
"eslint": "^7.19.0", | ||
"eslint-config-standard": "^16.0.2", | ||
"eslint-import-resolver-node": "^0.3.4", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.3.1" | ||
"eslint-plugin-promise": "^4.3.1", | ||
"typescript": "^4.1.5" | ||
}, | ||
"dependencies": { | ||
"debug": "^4.3.1", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare var content: any; | ||
export = content; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
type Locale = { languages: string, locale: string, acceptLanguages: string } | ||
type Application = { | ||
apiRoot: string; | ||
userAgnet: string; | ||
userAgentStatic: string; | ||
appVersion: string; | ||
appBuild: string; | ||
agoraKey: string; | ||
pubnubRoot: string; | ||
pubnubPubKey: string; | ||
pubnubSubKey: string; | ||
pubnubSDK: string; | ||
} | ||
|
||
export declare const application: { a297: Application, a304: Application }; | ||
export declare const locales: { English: Locale, Korean: Locale }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import fetch from "node-fetch"; | ||
|
||
export default function agent(url: string, options: any, customs: any): ReturnType<typeof fetch>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type ClubhouseApiResult<T> = ({ success: true } & T) | | ||
{ success: false, error_message: string }; | ||
|
||
export declare class Client { | ||
constructor(params: { profile: any }); | ||
[k: string]: <T>(...params: any) => Promise<ClubhouseApiResult<T>>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { Client as client } from './client'; | ||
import agent from './agent'; | ||
|
||
export { client, agent }; |
Oops, something went wrong.