@grey-ts/types 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +11 -11
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -752,7 +752,7 @@ declare namespace GreyHack {
752
752
  /** Waits for the next tick. */
753
753
  function yield(): null;
754
754
  /** Returns the type of the object */
755
- function getType(value: any): keyof GameTypeMap;
755
+ function getType(value: any): string;
756
756
  /** Checks if the given object is of a specific type
757
757
  * @example
758
758
  * const metax = includeLib("/lib/metaxploit.so");
@@ -776,7 +776,7 @@ declare namespace GreyHack {
776
776
  * include("./commands");
777
777
  */
778
778
  function include(file: string): void;
779
- type LibTypes = {
779
+ interface LibTypes {
780
780
  "aptclient.so": GreyHack.AptClient;
781
781
  "metaxploit.so": GreyHack.Metaxploit;
782
782
  "crypto.so": GreyHack.Crypto;
@@ -786,7 +786,7 @@ declare namespace GreyHack {
786
786
  "blockchain.so": GreyHack.BlockChain;
787
787
  "libsmartappliance.so": GreyHack.SmartAppliance;
788
788
  "libtrafficnet.so": GreyHack.TrafficNet;
789
- };
789
+ }
790
790
  }
791
791
  declare var activeUser: typeof GreyHack.activeUser;
792
792
  declare var bitAnd: typeof GreyHack.bitAnd;
@@ -835,18 +835,18 @@ declare var yield: typeof GreyHack.yield;
835
835
  declare const getType: typeof GreyHack.getType;
836
836
  declare const isType: typeof GreyHack.isType;
837
837
  declare const include: typeof GreyHack.include;
838
- type OtherTypeMap = {
838
+ interface PrimitiveTypeMap {
839
839
  "null": null;
840
- "pcomputer": unknown;
841
- "pfile": unknown;
842
- "prouter": unknown;
843
840
  "number": number;
844
841
  "list": Array<any>;
845
842
  "map": Record<string, any>;
846
843
  "function": Function;
847
844
  "string": string;
848
- };
849
- type ClassIDMap = {
845
+ }
846
+ interface ClassIDMap {
847
+ "pcomputer": unknown;
848
+ "pfile": unknown;
849
+ "prouter": unknown;
850
850
  "aptClientLib": GreyHack.AptClient;
851
851
  "blockChainLib": GreyHack.BlockChain;
852
852
  "ctfEvent": GreyHack.CtfEvent;
@@ -870,8 +870,8 @@ type ClassIDMap = {
870
870
  "subwallet": GreyHack.SubWallet;
871
871
  "TrafficNet": GreyHack.TrafficNet;
872
872
  "wallet": GreyHack.Wallet;
873
- };
874
- type GameTypeMap = ClassIDMap & OtherTypeMap;
873
+ }
874
+ type GameTypeMap = ClassIDMap & PrimitiveTypeMap;
875
875
  declare namespace GreyHack {
876
876
  interface Service {
877
877
  classID: "service";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grey-ts/types",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "TypeScript definitions for GreyHack's functions and objects",
5
5
  "license": "MIT",
6
6
  "types": "dist/index.d.ts",