Skip to content

Commit

Permalink
Merge pull request #17 from takker99/add-ci
Browse files Browse the repository at this point in the history
🚨 fix fmt
  • Loading branch information
takker99 authored Mar 24, 2022
2 parents db16c98 + c610db5 commit 1900570
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 5 deletions.
6 changes: 3 additions & 3 deletions base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export interface Page {
/** the thumbnail URL of a page if exists
*
* set to `null` if not exists
*/
*/
image: string | null;
/** the thumbnail text of a page.
* the maximum number of lines is 5.
* */ descriptions: string[];
* the maximum number of lines is 5.
*/ descriptions: string[];
/** ページの最終更新日時 */ updated: number;
/** Date last visitedに使われる最終アクセス日時 */ accessed: number;
}
Expand Down
2 changes: 1 addition & 1 deletion deps/events.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type { EventEmitter } from "https://deno.land/[email protected]/node/events.ts";
export type { EventEmitter } from "https://deno.land/[email protected]/node/_events.d.ts";
73 changes: 72 additions & 1 deletion deps/react.ts
Original file line number Diff line number Diff line change
@@ -1 +1,72 @@
export type { default as React } from "https://esm.sh/[email protected]";
/// <reference no-default-lib="true"/>
/// <reference lib="esnext"/>
/// <reference lib="dom"/>

// cut and modified from https://cdn.esm.sh/v73/@types/[email protected]/index.d.ts

type NativeMouseEvent = MouseEvent;

// deno-lint-ignore no-namespace
export namespace React {
/**
* currentTarget - a reference to the element on which the event listener is registered.
*
* target - a reference to the element from which the event was originally dispatched.
* This might be a child element to the element on which the event listener is registered.
* If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11508#issuecomment-256045682
*/
export interface SyntheticEvent<
T extends Element = Element,
E extends Event = Event,
> {
nativeEvent: E;
currentTarget: T & EventTarget;
target: EventTarget;
bubbles: boolean;
cancelable: boolean;
defaultPrevented: boolean;
eventPhase: number;
isTrusted: boolean;
preventDefault(): void;
isDefaultPrevented(): boolean;
stopPropagation(): void;
isPropagationStopped(): boolean;
persist(): void;
timeStamp: number;
type: string;
}
export interface AbstractView {
styleMedia: StyleMedia;
document: Document;
}

export interface UIEvent<T extends Element = Element, E extends Event = Event>
extends SyntheticEvent<T, E> {
detail: number;
view: AbstractView;
}
export interface MouseEvent<
T extends Element = Element,
E extends Event = NativeMouseEvent,
> extends UIEvent<T, E> {
altKey: boolean;
button: number;
buttons: number;
clientX: number;
clientY: number;
ctrlKey: boolean;
/**
* See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
*/
getModifierState(key: string): boolean;
metaKey: boolean;
movementX: number;
movementY: number;
pageX: number;
pageY: number;
relatedTarget: EventTarget | null;
screenX: number;
screenY: number;
shiftKey: boolean;
}
}
5 changes: 5 additions & 0 deletions userscript.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/// <reference no-default-lib="true"/>
/// <reference lib="esnext"/>
/// <reference lib="dom"/>
/// <reference lib="deno.ns" />

import { ParsedLine } from "./userscript/blocks.ts";
import { StringLc } from "./base.ts";
import type { Layout, PartialLayout } from "./layout.ts";
Expand Down

0 comments on commit 1900570

Please sign in to comment.