add interfaces

This commit is contained in:
Philipp Kunz 2018-02-08 01:52:08 +01:00
parent 0c27f73361
commit f3abade76f
5 changed files with 33 additions and 6 deletions

12
dist/index.d.ts vendored
View File

@ -1 +1,11 @@
export declare let standardExport: string; export declare type TLogLevel = "error" | "warn" | "info" | "verbose" | "debug" | "silly";
export interface ILogContext {
zone?: string;
company?: string;
companyunit?: string;
containerName?: string;
environment: TEnvironment;
runtime: TRuntime;
}
export declare type TEnvironment = "local" | "test" | "staging" | "production";
export declare type TRuntime = "node" | "browser";

3
dist/index.js vendored
View File

@ -1,4 +1,3 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.standardExport = 'Hi there! :) This is an exported string'; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFXLFFBQUEsY0FBYyxHQUFHLHlDQUF5QyxDQUFDIn0=

View File

@ -7,7 +7,7 @@
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(npmts)", "test": "(npmts --notest)",
"format": "(gitzone format)" "format": "(gitzone format)"
}, },
"devDependencies": { "devDependencies": {

View File

@ -2,7 +2,7 @@ import { expect, tap } from 'tapbundle'
import * as commonlog from '../ts/index' import * as commonlog from '../ts/index'
tap.test('first test', async () => { tap.test('first test', async () => {
console.log(commonlog.standardExport) console.log('Since this is an interface package, there is nothing to test dynamically :)')
}) })
tap.start() tap.start()

View File

@ -1 +1,19 @@
export let standardExport = 'Hi there! :) This is an exported string'; export type TLogLevel =
| "error"
| "warn"
| "info"
| "verbose"
| "debug"
| "silly";
export interface ILogContext {
zone?: string;
company?: string;
companyunit?: string;
containerName?: string;
environment: TEnvironment;
runtime: TRuntime;
}
export type TEnvironment = "local" | "test" | "staging" | "production";
export type TRuntime = "node" | "browser";