Skip to content

Commit

Permalink
feat: more type-safe & static type-definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardssh committed Dec 24, 2021
1 parent 882702c commit 44d06c2
Show file tree
Hide file tree
Showing 9 changed files with 255 additions and 266 deletions.
1 change: 1 addition & 0 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
rsync -vaI README.md out/
rsync -vaI LICENSE out/
rsync -vaI dist/ out/dist
rsync -vaI types/index.d.ts out/dist
echo -e "\n# Commit and push"
cd out
Expand Down
56 changes: 0 additions & 56 deletions api-extractor.json

This file was deleted.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"prepare": "husky install .github/husky",
"prebuild": "pnpm run clean",
"build": "rollup -c ./scripts/rollup.config.js",
"postbuild": "pnpm run types && rimraf ./dist/src && pnpm pack",
"types": "api-extractor run --local --verbose",
"postbuild": "rimraf ./dist/src && pnpm pack",
"clean": "rimraf {dist,*.tgz}",
"watch": "rollup -w -c ./scripts/rollup.config.js",
"update": "pnpm update --latest --interactive",
Expand Down Expand Up @@ -39,7 +38,6 @@
"devDependencies": {
"@commitlint/cli": "^15.0.0",
"@commitlint/config-conventional": "^15.0.0",
"@microsoft/api-extractor": "^7.19.2",
"@rollup/plugin-node-resolve": "^13.1.1",
"@types/node": "^17.0.2",
"@typescript-eslint/eslint-plugin": "^5.8.0",
Expand Down
150 changes: 0 additions & 150 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions src/@types/index.d.ts

This file was deleted.

14 changes: 14 additions & 0 deletions src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// eslint-disable-next-line no-var
export var mp: any;

export interface BrowserMp {
url: string;
execute: (code: string) => void;
[property: string]: any;
}

export interface PlayerMp {
call: (eventName: string, args?: any[]) => void;
[property: string]: any;
}

enum MpTypes {
Blip = 'b',
Checkpoint = 'cp',
Expand Down
Loading

0 comments on commit 44d06c2

Please sign in to comment.