Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F996182
type-overrides.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
type-overrides.ts
View Options
import
type
*
as
Sealious
from
"../main.js"
;
import
type
{
Socket
}
from
"net"
;
import
type
*
as
url
from
"url"
;
// adding this so properties `$app` and `$context` of `ctx` are known
declare
module
"koa"
{
interface
BaseContext
{
$context
:
Sealious
.
Context
;
$app
:
Sealious
.
App
;
$body
:
Record
<
string
,
unknown
>
;
}
}
type
Query
=
Record
<
string
,
unknown
>
;
//shamelessly copied the declarations from @types/koa. Changed here is only the
//`query` parameter type, again to help with linting
declare
module
"koa"
{
interface
ContextDelegatedRequest
{
header
:
any
;
headers
:
any
;
url
:
string
;
origin
:
string
;
href
:
string
;
method
:
string
;
path
:
string
;
query
:
Query
;
querystring
:
string
;
search
:
string
;
host
:
string
;
hostname
:
string
;
URL
:
url
.
URL
;
fresh
:
boolean
;
stale
:
boolean
;
idempotent
:
boolean
;
socket
:
Socket
;
protocol
:
string
;
secure
:
boolean
;
ip
:
string
;
ips
:
string
[];
subdomains
:
string
[];
accepts
()
:
string
[]
|
boolean
;
accepts
(...
types
:
string
[])
:
string
|
boolean
;
accepts
(
types
:
string
[])
:
string
|
boolean
;
acceptsEncodings
()
:
string
[]
|
boolean
;
acceptsEncodings
(...
encodings
:
string
[])
:
string
|
boolean
;
acceptsEncodings
(
encodings
:
string
[])
:
string
|
boolean
;
acceptsCharsets
()
:
string
[]
|
boolean
;
acceptsCharsets
(...
charsets
:
string
[])
:
string
|
boolean
;
acceptsCharsets
(
charsets
:
string
[])
:
string
|
boolean
;
acceptsLanguages
()
:
string
[]
|
boolean
;
acceptsLanguages
(...
langs
:
string
[])
:
string
|
boolean
;
acceptsLanguages
(
langs
:
string
[])
:
string
|
boolean
;
get
(
field
:
string
)
:
string
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Tue, Dec 24, 13:14 (1 d, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
555251
Default Alt Text
type-overrides.ts (1 KB)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment