From 1c77d64f6b7bbc3bbdabfa44802b52e0131ebb72 Mon Sep 17 00:00:00 2001 From: kascheml Date: Sun, 4 Dec 2022 16:32:10 +0100 Subject: [PATCH] Initial commit --- .gitignore | 1 + console.d.ts | 37 +++++++++++++++++++++++++++++++++++++ index.d.ts | 2 ++ package-lock.json | 29 +++++++++++++++++++++++++++++ package.json | 11 +++++++++++ 5 files changed, 80 insertions(+) create mode 100644 .gitignore create mode 100644 console.d.ts create mode 100644 index.d.ts create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2ccbe46 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/node_modules/ diff --git a/console.d.ts b/console.d.ts new file mode 100644 index 0000000..957d856 --- /dev/null +++ b/console.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +interface Console { + assert(condition?: boolean, ...data: any[]): void; + clear(): void; + count(label?: string): void; + countReset(label?: string): void; + debug(...data: any[]): void; + dir(item?: any, options?: any): void; + dirxml(...data: any[]): void; + error(...data: any[]): void; + group(...data: any[]): void; + groupCollapsed(...data: any[]): void; + groupEnd(): void; + info(...data: any[]): void; + log(...data: any[]): void; + table(tabularData?: any, properties?: string[]): void; + time(label?: string): void; + timeEnd(label?: string): void; + timeLog(label?: string, ...data: any[]): void; + timeStamp(label?: string): void; + trace(...data: any[]): void; + warn(...data: any[]): void; +} + +declare var console: Console; diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..7a7d3e2 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,2 @@ +import "./console" +import "screeps" diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..de75384 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,29 @@ +{ + "name": "@kascheml/screeps-types", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "@kascheml/screeps-types", + "version": "0.0.1", + "license": "Apache-2.0", + "dependencies": { + "@types/screeps": "^3.3.0" + } + }, + "node_modules/@types/screeps": { + "version": "3.3.0", + "resolved": "https://npm.kascheml.de/@types%2fscreeps/-/screeps-3.3.0.tgz", + "integrity": "sha512-1Fw/U0V0INPS4rS+SpjRi3zswf5cxgwTdNVN0UksWAkuVidS/4NCCx0LHZqvOByx6kP8J+7O9z3SMzK5prz5cA==", + "license": "MIT" + } + }, + "dependencies": { + "@types/screeps": { + "version": "3.3.0", + "resolved": "https://npm.kascheml.de/@types%2fscreeps/-/screeps-3.3.0.tgz", + "integrity": "sha512-1Fw/U0V0INPS4rS+SpjRi3zswf5cxgwTdNVN0UksWAkuVidS/4NCCx0LHZqvOByx6kP8J+7O9z3SMzK5prz5cA==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..c04b0a3 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "@kascheml/screeps-types", + "version": "0.0.2", + "description": "TypeScript typings for Screeps", + "author": "Kascheml", + "license": "Apache-2.0", + "repository": "https://ihgit.de/screeps/screeps-types.git", + "dependencies": { + "@types/screeps": "^3.3.0" + } +}