File tree 9 files changed +21
-21
lines changed
9 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ declare global {
7
7
type Auth = import ( '$lib/server/lucia/types' ) . Auth ;
8
8
// Database user = AuthUserSchema
9
9
// Properties of the auth user schema that Lucia can be aware of
10
- type DatabaseUserAttributes = {
10
+ interface DatabaseUserAttributes {
11
11
email : string ;
12
12
email_verified : boolean ;
13
13
created_at ?: Date ;
14
- } ;
14
+ }
15
15
type DatabaseSessionAttributes = Record < string , never > ;
16
16
}
17
17
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
export let component: any ;
3
- export let text: string = ' mock-slot-text' ;
3
+ export let text = ' mock-slot-text' ;
4
4
</script >
5
5
6
6
<svelte:component this =" {component }" >
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export const logger = (function () {
18
18
return (
19
19
message : string ,
20
20
context : LoggerContext = { } ,
21
- stackLevel : number = 3 ,
21
+ stackLevel = 3 ,
22
22
) => {
23
23
if ( ! shouldBeLogged ( methodName ) ) {
24
24
return ;
Original file line number Diff line number Diff line change @@ -19,6 +19,6 @@ export function getClientSentryIntegrations(
19
19
20
20
export function setClientPosthogSessionId ( ) : void {
21
21
if ( posthog ) {
22
- sentry ?. setTag ( POSTHOG_SESSION_ID_TAG , getSessionId ( ) as string ) ;
22
+ sentry ?. setTag ( POSTHOG_SESSION_ID_TAG , getSessionId ( ) ! ) ;
23
23
}
24
24
}
Original file line number Diff line number Diff line change 1
1
// See `state` parameter:
2
2
// https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow#redirecting
3
- export const GOOGLE_OAUTH_STATE_COOKIE_NAME : string = 'google_oauth_state' ;
4
- export const GOOGLE_OAUTH_STATE_SEPARATOR : string = '-----' ;
5
- export const GOOGLE_OAUTH_STATE_QUERY_PARAM_NAME : string = 'state' ;
6
- export const GOOGLE_OAUTH_CODE_QUERY_PARAM_NAME : string = 'code' ;
7
- export const GOOGLE_OAUTH_TYPE_QUERY_PARAM_VALUE : string = 'google' ;
3
+ export const GOOGLE_OAUTH_STATE_COOKIE_NAME = 'google_oauth_state' ;
4
+ export const GOOGLE_OAUTH_STATE_SEPARATOR = '-----' ;
5
+ export const GOOGLE_OAUTH_STATE_QUERY_PARAM_NAME = 'state' ;
6
+ export const GOOGLE_OAUTH_CODE_QUERY_PARAM_NAME = 'code' ;
7
+ export const GOOGLE_OAUTH_TYPE_QUERY_PARAM_VALUE = 'google' ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export const roarr = (function () {
20
20
return (
21
21
message : string ,
22
22
context : ServerLoggerContextWithError = { } ,
23
- stackLevel : number = 3 ,
23
+ stackLevel = 3 ,
24
24
) => {
25
25
if ( ! shouldBeLogged ( methodName ) ) {
26
26
return ;
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ export type ServerLoggerLoggingMethodName =
11
11
| ServerLoggerLoggingMethodNameNoOnce
12
12
| ServerLoggerLoggingMethodNameOnce ;
13
13
14
- export type JsonObject = {
14
+ export interface JsonObject {
15
15
[ k : string ] : JsonValue ;
16
- } ;
16
+ }
17
17
export type JsonValue =
18
18
| JsonObject
19
19
| JsonValue [ ]
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export function enrichLoggerContextWithSentryTraceId<T extends LoggerContext>(
26
26
export function enrichContextWithDebugInfo (
27
27
context : LoggerContext = { } ,
28
28
rootFolder = '' ,
29
- stackLevel : number = 3 ,
29
+ stackLevel = 3 ,
30
30
) : LoggerContext {
31
31
return {
32
32
...context ,
@@ -35,7 +35,7 @@ export function enrichContextWithDebugInfo(
35
35
} ;
36
36
}
37
37
38
- function getCallName ( stackLevel : number = 3 ) : string {
38
+ function getCallName ( stackLevel = 3 ) : string {
39
39
const typeName = callsites ( ) [ stackLevel ] ?. getTypeName ( ) ?? '' ;
40
40
const functionName =
41
41
callsites ( ) [ 3 ] ?. getFunctionName ( ) ??
@@ -49,7 +49,7 @@ function getCallName(stackLevel: number = 3): string {
49
49
return functionName ;
50
50
}
51
51
52
- function getFileName ( rootFolder = '' , stackLevel : number = 3 ) : string {
52
+ function getFileName ( rootFolder = '' , stackLevel = 3 ) : string {
53
53
const fileName =
54
54
callsites ( ) [ stackLevel ] ?. getFileName ( ) ??
55
55
callsites ( ) [ stackLevel ] ?. getEvalOrigin ( ) ??
Original file line number Diff line number Diff line change @@ -67,23 +67,23 @@ export function cleanSearchParamsAndGenerateQuery(
67
67
const path = String ( errorPath [ 0 ] ) ;
68
68
69
69
if ( [ 'page' , 'count' ] . includes ( path ) ) {
70
- delete findCodeSnippetsQuery [ ' page' ] ;
70
+ delete findCodeSnippetsQuery . page ;
71
71
cleanedSearchParams . delete ( 'page' ) ;
72
72
73
- findCodeSnippetsQuery [ ' count' ] = DEFAULT_CODE_SNIPPET_COUNT ;
73
+ findCodeSnippetsQuery . count = DEFAULT_CODE_SNIPPET_COUNT ;
74
74
cleanedSearchParams . delete ( 'count' ) ;
75
75
}
76
76
77
77
if ( [ 'filterBy' ] . includes ( path ) ) {
78
- delete findCodeSnippetsQuery [ ' filterBy' ] ;
78
+ delete findCodeSnippetsQuery . filterBy ;
79
79
cleanedSearchParams . delete ( 'filterBy' ) ;
80
80
81
- delete findCodeSnippetsQuery [ ' filterValue' ] ;
81
+ delete findCodeSnippetsQuery . filterValue ;
82
82
cleanedSearchParams . delete ( 'filterValue' ) ;
83
83
}
84
84
85
85
if ( [ 'sortOrder' ] . includes ( path ) ) {
86
- findCodeSnippetsQuery [ ' sortOrder' ] = 'asc' ;
86
+ findCodeSnippetsQuery . sortOrder = 'asc' ;
87
87
cleanedSearchParams . delete ( 'sortOrder' ) ;
88
88
}
89
89
} ) ;
You can’t perform that action at this time.
0 commit comments