Skip to content

Commit

Permalink
fix(fronts-transport): fix type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Jun 19, 2021
1 parent 4460f99 commit e099123
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"packages": [
"packages/*"
],
"version": "0.0.5"
"version": "0.0.6"
}
2 changes: 1 addition & 1 deletion packages/fronts-bundler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fronts-bundler",
"version": "0.0.5",
"version": "0.0.6",
"description": "",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/fronts-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fronts-react",
"version": "0.0.5",
"version": "0.0.6",
"description": "",
"main": "dist/index.cjs.js",
"unpkg": "dist/index.umd.js",
Expand All @@ -16,7 +16,7 @@
"react": "^16.13.0"
},
"dependencies": {
"fronts": "^0.0.5"
"fronts": "^0.0.6"
},
"devDependencies": {
"@types/react": "^16.13.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/fronts-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fronts-test",
"version": "0.0.5",
"version": "0.0.6",
"description": "",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/fronts-transport/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fronts-transport",
"version": "0.0.5",
"version": "0.0.6",
"description": "",
"main": "dist/index.cjs.js",
"unpkg": "dist/index.umd.js",
Expand All @@ -12,6 +12,6 @@
"author": "unadlib",
"license": "MIT",
"dependencies": {
"data-transport": "^2.0.2"
"data-transport": "^2.1.0"
}
}
6 changes: 3 additions & 3 deletions packages/fronts-transport/src/globalTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import { ListenerOptions, Transport, TransportOptions } from 'data-transport';
import { postMessageToFrames } from './postMessage';

interface EventTransportOptions extends Partial<TransportOptions> {
interface GlobalTransportOptions extends Partial<TransportOptions> {
/**
* Specify what the origin of targetWindow must be for the event to be dispatched,
* by default, it's the literal string "*" (indicating no preference).
*/
targetOrigin?: string;
}

export class GlobalTransport<T = any> extends Transport<T> {
export class GlobalTransport<T = any, P = any> extends Transport<T, P> {
constructor({
targetOrigin = '*',
listener = (callback) => {
Expand All @@ -29,7 +29,7 @@ export class GlobalTransport<T = any> extends Transport<T> {
},
checkListen = false,
...options
}: EventTransportOptions) {
}: GlobalTransportOptions) {
super({
...options,
checkListen,
Expand Down
4 changes: 2 additions & 2 deletions packages/fronts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fronts",
"version": "0.0.5",
"version": "0.0.6",
"description": "",
"main": "dist/index.cjs.js",
"unpkg": "dist/index.umd.js",
Expand All @@ -13,7 +13,7 @@
"data-transport": "^2.0.1"
},
"dependencies": {
"fronts-transport": "^0.0.5"
"fronts-transport": "^0.0.6"
},
"author": "unadlib",
"license": "MIT"
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3005,10 +3005,10 @@ dashdash@^1.12.0:
dependencies:
assert-plus "^1.0.0"

data-transport@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/data-transport/-/data-transport-2.0.2.tgz#721f71c1003c541d069e4c61622ad9bba6ec62a1"
integrity sha512-jxvcwqZq6bRvPTvO6IGx7S+bfFwnTahdkfemv5B0jLzhUearPoUbMdk1WiHVD3o2wmwW1s7njb5gcAgNP2eM2A==
data-transport@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/data-transport/-/data-transport-2.1.0.tgz#07ec81bc95c4a9eb8114dc6e3893d19bf275c6c2"
integrity sha512-UZePHfROZe2JwQVn2U1U6dJtwQyDVeM7pazoDfZM+tur5e8THsIDibbMusyx0iCaFbf3Nlur252PVhjmnnHRqQ==
dependencies:
uuid "^8.3.0"

Expand Down

0 comments on commit e099123

Please sign in to comment.