Skip to content

Commit a0c2c82

Browse files
authored
Merge pull request #46 from takker99/fix-types
🐛 rest/mod.tsはdeno.windowでも使えるようにする
2 parents 5e4e7c5 + 3531916 commit a0c2c82

File tree

15 files changed

+38
-37
lines changed

15 files changed

+38
-37
lines changed

browser/websocket/patch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { connect, disconnect } from "./socket.ts";
33
import { getProjectId, getUserId } from "./id.ts";
44
import { makeChanges } from "./makeChanges.ts";
55
import { HeadData, pull } from "./pull.ts";
6-
import type { Line } from "../../deps/scrapbox.ts";
6+
import type { Line } from "../../deps/scrapbox-rest.ts";
77
import { pushCommit, pushWithRetry } from "./_fetch.ts";
88

99
export interface PatchOptions {

browser/websocket/pull.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Line } from "../../deps/scrapbox.ts";
1+
import type { Line } from "../../deps/scrapbox-rest.ts";
22
import { getPage } from "../../rest/pages.ts";
33

44
export interface HeadData {

deps/scrapbox-rest.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
export type {
2+
BadRequestError,
3+
BaseLine as Line,
4+
ErrorLike,
5+
ExportedData,
6+
GuestUser,
7+
ImportedData,
8+
InvalidURLError,
9+
MemberProject,
10+
MemberUser,
11+
NoQueryError,
12+
NotFoundError,
13+
NotLoggedInError,
14+
NotMemberError,
15+
NotMemberProject,
16+
NotPrivilegeError,
17+
Page,
18+
PageList,
19+
ProjectSearchResult,
20+
SearchedTitle,
21+
SearchResult,
22+
SessionError,
23+
TweetInfo,
24+
} from "https://raw.githubusercontent.com/scrapbox-jp/types/0.3.3/rest.ts";

deps/scrapbox.ts

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
11
export type {
2-
BadRequestError,
3-
BaseLine as Line,
4-
ErrorLike,
5-
ExportedData,
6-
GuestUser,
7-
ImportedData,
8-
InvalidURLError,
9-
MemberProject,
10-
MemberUser,
11-
NoQueryError,
12-
NotFoundError,
13-
NotLoggedInError,
14-
NotMemberError,
15-
NotMemberProject,
16-
NotPrivilegeError,
17-
Page,
18-
PageList,
19-
ProjectSearchResult,
20-
SearchedTitle,
21-
SearchResult,
22-
SessionError,
23-
TweetInfo,
24-
} from "https://raw.githubusercontent.com/scrapbox-jp/types/0.3.3/rest.ts";
25-
export type {
2+
Line,
263
Scrapbox,
274
} from "https://raw.githubusercontent.com/scrapbox-jp/types/0.3.3/userscript.ts";
285
export type {

is.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ErrorLike } from "./deps/scrapbox.ts";
1+
import type { ErrorLike } from "./deps/scrapbox-rest.ts";
22
// These code are based on https://deno.land/x/unknownutil@v1.1.0/is.ts
33

44
export const isNone = (value: unknown): value is undefined | null =>

rest/getGyazoToken.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { NotLoggedInError } from "../deps/scrapbox.ts";
1+
import type { NotLoggedInError } from "../deps/scrapbox-rest.ts";
22
import { cookie } from "./auth.ts";
33
import { UnexpectedResponseError } from "./error.ts";
44
import { tryToErrorLike } from "../is.ts";

rest/getTweetInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type {
33
InvalidURLError,
44
SessionError,
55
TweetInfo,
6-
} from "../deps/scrapbox.ts";
6+
} from "../deps/scrapbox-rest.ts";
77
import { cookie, getCSRFToken } from "./auth.ts";
88
import { UnexpectedResponseError } from "./error.ts";
99
import { tryToErrorLike } from "../is.ts";

rest/getWebPageTitle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type {
22
BadRequestError,
33
InvalidURLError,
44
SessionError,
5-
} from "../deps/scrapbox.ts";
5+
} from "../deps/scrapbox-rest.ts";
66
import { cookie, getCSRFToken } from "./auth.ts";
77
import { UnexpectedResponseError } from "./error.ts";
88
import { tryToErrorLike } from "../is.ts";

rest/link.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type {
33
NotFoundError,
44
NotLoggedInError,
55
SearchedTitle,
6-
} from "../deps/scrapbox.ts";
6+
} from "../deps/scrapbox-rest.ts";
77
import { cookie } from "./auth.ts";
88
import { UnexpectedResponseError } from "./error.ts";
99
import { tryToErrorLike } from "../is.ts";

rest/page-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {
55
NotFoundError,
66
NotLoggedInError,
77
NotPrivilegeError,
8-
} from "../deps/scrapbox.ts";
8+
} from "../deps/scrapbox-rest.ts";
99
import { cookie, getCSRFToken } from "./auth.ts";
1010
import { UnexpectedResponseError } from "./error.ts";
1111
import { tryToErrorLike } from "../is.ts";

0 commit comments

Comments
 (0)