-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b89b748
commit 6ece18d
Showing
39 changed files
with
277 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
declare namespace RichText { | ||
type Element = HTMLTextAreaElement & { richtext: boolean }; | ||
type Replacement = [string, string, string]; | ||
type Action = (str?: string) => Replacement | void; | ||
type Decoration = (str: string) => Replacement; | ||
|
||
interface Decorator { | ||
blockquote: Decoration; | ||
bold: Decoration; | ||
emphasis: Decoration; | ||
image: Decoration; | ||
spoiler: Decoration; | ||
code: (string: string, lang: string) => Replacement; | ||
link: (string: string, name: string) => Replacement; | ||
quote: (html: string, username: string, link: string) => Replacement; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
|
||
namespace UserLink { | ||
interface Link { | ||
declare namespace UserLink { | ||
type Link = { | ||
id: number | null; | ||
label: string; | ||
name: string; | ||
url: string; | ||
deleted: boolean; | ||
handle: string; | ||
} | ||
}; | ||
|
||
interface State { | ||
editing: boolean; | ||
type State = { | ||
editing: Link | null; | ||
userLinks: Link[]; | ||
} | ||
}; | ||
|
||
interface Action { | ||
type: string; | ||
payload?: Link[] | Link; | ||
} | ||
type Action = | ||
| { type: "add" | "cancel" } | ||
| { type: "delete" | "edit" | "save" | "update"; payload: Link } | ||
| { type: "reorder"; payload: Link[] }; | ||
} | ||
|
||
/* eslint-enable @typescript-eslint/no-unused-vars */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
interface PostAttributes { | ||
type PostAttributes = { | ||
id: number; | ||
user_id: number; | ||
exchange_type: string; | ||
exchange_id?: number; | ||
} | ||
}; | ||
|
||
interface UserAttributes { | ||
type UserAttributes = { | ||
id: number; | ||
username: string; | ||
admin: boolean; | ||
moderator: boolean; | ||
} | ||
}; | ||
|
||
interface PostingStatusEvent extends CustomEvent { | ||
type PostingStatusEvent = CustomEvent & { | ||
detail: string; | ||
} | ||
}; | ||
|
||
interface PostsLoadedEvent extends CustomEvent { | ||
type PostsLoadedEvent = CustomEvent & { | ||
detail: HTMLElement[]; | ||
} | ||
}; | ||
|
||
interface QuoteEvent extends CustomEvent { | ||
type QuoteEvent = CustomEvent & { | ||
detail: { | ||
username: string; | ||
permalink: string; | ||
html: string; | ||
}; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.