Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
surma authored Jun 23, 2020
2 parents 1c2e4d1 + 9e1ef7f commit c915acc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@
"chai": "4.2.0",
"conditional-type-checks": "1.0.5",
"husky": "4.2.5",
"karma": "5.0.2",
"karma": "^5.0.9",
"karma-chai": "0.1.0",
"karma-chrome-launcher": "3.1.0",
"karma-detect-browsers": "2.3.3",
"karma-firefox-launcher": "1.3.0",
"karma-mocha": "2.0.0",
"karma-mocha": "^2.0.1",
"karma-safari-launcher": "1.0.0",
"karma-safaritechpreview-launcher": "2.0.2",
"mocha": "7.1.2",
"mocha": "^7.2.0",
"prettier": "2.0.5",
"rimraf": "3.0.2",
"rollup": "2.7.3",
"rollup-plugin-terser": "5.3.0",
"rollup-plugin-typescript2": "0.27.0",
"typescript": "3.8.3"
"rollup": "^2.11.2",
"rollup-plugin-terser": "^6.1.0",
"rollup-plugin-typescript2": "^0.27.1",
"typescript": "^3.9.3"
},
"dependencies": {}
}
1 change: 0 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function config({ format, minify, input, ext = "js" }) {
}),
minify
? terser({
sourcemap: true,
compress: true,
mangle: true,
})
Expand Down
15 changes: 8 additions & 7 deletions tests/type-checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ async function closureSoICanUseAwait() {
assert<Has<typeof r3, Promise<number>>>(true);

// @ts-expect-error
// proxy.proxyProp.method(123);
proxy.proxyProp.method(123);

// @ts-expect-error
// proxy.proxyProp.method();
proxy.proxyProp.method();

const r4 = proxy.methodWithProxiedReturnValue();
assert<IsAny<typeof r4>>(false);
Expand Down Expand Up @@ -188,10 +188,10 @@ async function closureSoICanUseAwait() {
inst1[Comlink.createEndpoint]();

// @ts-expect-error
// await new ProxiedFooClass(123);
await new ProxiedFooClass(123);

// @ts-expect-error
// await new ProxiedFooClass();
await new ProxiedFooClass();

//
// Tests for advanced proxy use cases
Expand Down Expand Up @@ -302,12 +302,12 @@ async function closureSoICanUseAwait() {
>(true);

// @ts-expect-error
// subscriber.next();
subscriber.next();

if (subscriber.next) {
// Only checking for presence is not enough, since it could be a Promise
// @ts-expect-error
// subscriber.next();
subscriber.next();
}

if (typeof subscriber.next === "function") {
Expand All @@ -324,7 +324,7 @@ async function closureSoICanUseAwait() {
proxy2.registerProvider(
// Async callback
Comlink.proxy(async ({ textDocument }: Params) => {
return Comlink.proxy({
const subscribable = Comlink.proxy({
subscribe(
subscriber: Comlink.Remote<Subscriber<string> & Comlink.ProxyMarked>
): Unsubscribable & Comlink.ProxyMarked {
Expand All @@ -345,6 +345,7 @@ async function closureSoICanUseAwait() {
return Comlink.proxy({ unsubscribe() {} });
},
});
return subscribable;
})
);
}
Expand Down

0 comments on commit c915acc

Please sign in to comment.