Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #7232 from webpack/feature/json-to-typescript
build(declarations): create `schema-to-declarations` script add declarations
  • Loading branch information
sokra committed Sep 21, 2018
2 parents 61718d4 + 62b6142 commit 3b6d149
Show file tree
Hide file tree
Showing 64 changed files with 4,282 additions and 1,480 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Expand Up @@ -23,7 +23,7 @@ module.exports = {
yoda: "error",
eqeqeq: "error",
"global-require": "off",
"brace-style": "error",
"brace-style": "off",
"eol-last": "error",
"no-extra-bind": "warn",
"no-process-exit": "warn",
Expand Down
9 changes: 9 additions & 0 deletions declarations.d.ts
Expand Up @@ -220,6 +220,15 @@ declare module "@webassemblyjs/ast" {
export function isFuncImportDescr(n: Node): boolean;
}

// This "hack" is needed because typescript doesn't support recursive type definitions
// It's referenced from "ruleSet-conditions" in schemas/WebpackOptions.json
interface RuleSetConditionsRecursive
extends Array<import("./declarations/WebpackOptions").RuleSetCondition> {}
interface RuleSetConditionsAbsoluteRecursive
extends Array<
import("./declarations/WebpackOptions").RuleSetConditionAbsolute
> {}

/**
* Global variable declarations
* @todo Once this issue is resolved, remove these globals and add JSDoc onsite instead
Expand Down

0 comments on commit 3b6d149

Please sign in to comment.