Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly reference imports for module type #217

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/connect-query/src/connect-query-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import type {
ServiceType,
} from "@bufbuild/protobuf";

import type { DisableQuery } from "./utils";
import { disableQuery } from "./utils";
import type { DisableQuery } from "./utils.js";
import { disableQuery } from "./utils.js";

/**
* TanStack Query requires query keys in order to decide when the query should automatically update.
Expand Down
6 changes: 3 additions & 3 deletions packages/connect-query/src/create-query-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import type {
import { MethodKind } from "@bufbuild/protobuf";
import type { Transport } from "@connectrpc/connect";

import type { UnaryFunctions } from "./create-unary-functions";
import { createUnaryFunctions } from "./create-unary-functions";
import { unreachableCase } from "./utils";
import type { UnaryFunctions } from "./create-unary-functions.js";
import { createUnaryFunctions } from "./create-unary-functions.js";
import { unreachableCase } from "./utils.js";

/**
* This is an array of supported `MethodKind`s
Expand Down
4 changes: 2 additions & 2 deletions packages/connect-query/src/create-query-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import type { ServiceType } from "@bufbuild/protobuf";
import type { Transport } from "@connectrpc/connect";

import type { QueryFunctions } from "./create-query-functions";
import { createQueryFunctions } from "./create-query-functions";
import type { QueryFunctions } from "./create-query-functions.js";
import { createQueryFunctions } from "./create-query-functions.js";

const servicesToHooks = new Map<ServiceType, QueryFunctions<ServiceType>>();

Expand Down
8 changes: 4 additions & 4 deletions packages/connect-query/src/create-unary-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ import type {
import type {
ConnectPartialQueryKey,
ConnectQueryKey,
} from "./connect-query-key";
import { makeConnectQueryKeyGetter } from "./connect-query-key";
import type { DisableQuery } from "./utils";
} from "./connect-query-key.js";
import { makeConnectQueryKeyGetter } from "./connect-query-key.js";
import type { DisableQuery } from "./utils.js";
import {
assert,
disableQuery,
isUnaryMethod,
protobufSafeUpdater,
unreachableCase,
} from "./utils";
} from "./utils.js";

type RequireExactlyOne<T, Keys extends keyof T = keyof T> = {
[K in Keys]-?: Partial<Record<Exclude<Keys, K>, undefined>> &
Expand Down
4 changes: 2 additions & 2 deletions packages/connect-query/src/create-unary-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import type { Message } from "@bufbuild/protobuf";

import type { UnaryFunctions } from "./create-unary-functions";
import { useTransport } from "./use-transport";
import type { UnaryFunctions } from "./create-unary-functions.js";
import { useTransport } from "./use-transport.js";

/**
* All the additional hooks that are unique to React.
Expand Down
24 changes: 12 additions & 12 deletions packages/connect-query/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@

import type { Message } from "@bufbuild/protobuf";

import type { UnaryFunctions } from "./create-unary-functions";
import type { UnaryHooks } from "./create-unary-hooks";
import type { UnaryFunctions } from "./create-unary-functions.js";
import type { UnaryHooks } from "./create-unary-hooks.js";

export { createQueryService } from "./create-query-service";
export { createQueryService } from "./create-query-service.js";
export type {
QueryFunctions,
SupportedMethodInfo,
IsSupportedMethod,
SupportedMethodKinds,
} from "./create-query-functions";
} from "./create-query-functions.js";
export {
createQueryFunctions,
supportedMethodKinds,
isSupportedMethod,
} from "./create-query-functions";
} from "./create-query-functions.js";
export type {
ConnectQueryKey,
ConnectPartialQueryKey,
} from "./connect-query-key";
export type { UnaryFunctions } from "./create-unary-functions";
export { createUnaryFunctions } from "./create-unary-functions";
export { disableQuery } from "./utils";
export { useTransport, TransportProvider } from "./use-transport";
export type { UnaryHooks } from "./create-unary-hooks";
export { createUnaryHooks } from "./create-unary-hooks";
} from "./connect-query-key.js";
export type { UnaryFunctions } from "./create-unary-functions.js";
export { createUnaryFunctions } from "./create-unary-functions.js";
export { disableQuery } from "./utils.js";
export { useTransport, TransportProvider } from "./use-transport.js";
export type { UnaryHooks } from "./create-unary-hooks.js";
export { createUnaryHooks } from "./create-unary-hooks.js";

/**
* Combined type of all the functions generated for a service.
Expand Down