tridactyl/src/tridactyl.d.ts

40 lines
905 B
TypeScript
Raw Normal View History

// Interfaces common to the tridactyl project.
// For some obscure reason, tsc doesn't like .d.ts files to share a name with
// .ts files. So don't do that.
interface Number {
mod(n: number): number
clamp(lo: number, hi: number): number
}
2017-09-28 22:39:26 +01:00
// For content.ts
interface Message {
2017-10-06 03:28:14 +01:00
type:
"excmd_contentcommand" |
"keydown" |
"keydown_suppress" |
"commandline" |
"commandline_frame"
2017-10-06 03:28:14 +01:00
// And other unknown attributes...
[key: string]: any
}
declare var content: any
2017-09-28 22:39:26 +01:00
// Firefox-specific dom properties
interface Window {
scrollByLines(n: number): void
scrollByPages(n: number): void
}
// Web extension types not in web-ext-types yet
declare namespace browser.find {
function find(query, object): any
}
declare namespace browser.sessions{
function getRecentlyClosed(filter: any): any
function restore(sessionId: number): any
}