Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
Output declarations to a temporary directory, because TS will add
the declaration directory to excludes.

Make a field public because the declarations build doesn't allow
for private fields in some places.
  • Loading branch information
Floris Bernard committed Feb 22, 2019
1 parent 0916977 commit 5abf3ce
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ node_modules/
/coverage/
/.nyc_output/
/tmp/
/decl/

## only ignore in git
/lib
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ node_modules/
/coverage/
/.nyc_output/
/tmp/
/decl/

# .npmignore
.babelrc
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "seng-event",
"version": "2.0.0-alpha.4",
"version": "2.0.0-alpha.5",
"description": "Provides Classes and utilities for dispatching and listening to events.",
"main": "./index.js",
"types": "./index.d.ts",
Expand All @@ -12,7 +12,7 @@
"dev:ts": "tsc --noEmit --allowJs --watch",
"build": "npm-run-all -s clean build:*",
"build:babel": "babel ./src -x \".ts\" -x \".js\" --out-dir ./",
"build:ts": "tsc -p ./tsconfig.build.json",
"build:ts": "tsc -p ./tsconfig.build.json && shx cp -Rf decl/* .",
"test": "jest",
"test:types": "typings-checker --allow-expect-error --project tsconfig.json test/types/tests.ts",
"test:dev": "jest --watch",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/IsomorphicBaseEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class IsomorphicBaseEvent<
public type: TType;
public data: DataForIsomorphicEvent<TType, TTypes, TDataTypes>;

private typeOptions: EventOptionsMap<TTypes[number]>;
public typeOptions: EventOptionsMap<TTypes[number]>;

constructor(
type: TType,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"allowJs": false,
"outDir": "tmp",
"declaration": true,
"declarationDir": "./",
"declarationDir": "./decl",
"emitDeclarationOnly": true
}
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
]
},
"include": [
"src/**/*",
"types/**/*.d.ts"
"./src/**/*",
"./types/**/*.d.ts"
]
}

0 comments on commit 5abf3ce

Please sign in to comment.