Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Commit

Permalink
feat(types): enabled type declarations and source maps to be transpiled
Browse files Browse the repository at this point in the history
  • Loading branch information
ryparker committed Jul 6, 2020
1 parent b1841cd commit d69ad2d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"dist"
],
"main": "dist/index",
"types": "dist/index.d.ts",
"scripts": {
"build": "rimraf dist && tsc",
"test": "rimraf allure-results && yarn build && jest",
Expand Down
23 changes: 11 additions & 12 deletions src/circus-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@ import NodeEnvironment from 'jest-environment-node';
import type {EnvironmentContext} from '@jest/environment';
import AllureReporter from './allure-reporter';
import {AllureRuntime, IAllureConfig} from 'allure-js-commons';
import type JestAllureInterface from './allure-interface';
// Import type JestAllureInterface from './allure-interface';

export interface Global extends NodeJS.Global {
allure: JestAllureInterface;
}

declare global {
namespace NodeJS {
interface Global {
allure: JestAllureInterface;
}
}
}
// export interface Global extends NodeJS.Global {
// allure: JestAllureInterface;
// }

// declare global {
// namespace NodeJS {
// interface Global {
// allure: JestAllureInterface;
// }
// }
// }
export default class CircusEnvironment extends NodeEnvironment {
private readonly reporter: AllureReporter;
private readonly testPath: string;
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"target": "es2019",
"module": "commonjs",
"moduleResolution": "node",
"declaration": false,
"declaration": true,
"sourceMap": true,
"isolatedModules": true,
"importsNotUsedAsValues": "error",
"noImplicitReturns": true,
Expand Down

0 comments on commit d69ad2d

Please sign in to comment.