Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
764f7ea5
Commit
764f7ea5
authored
Apr 17, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor type utils
parent
b875a1e2
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
12 deletions
+10
-12
resources.ts
lib/api/resources.ts
+1
-1
utils.ts
types/utils.ts
+6
-0
ArrayElement.ts
types/utils/ArrayElement.ts
+0
-4
ExcludeNull.ts
types/utils/ExcludeNull.ts
+0
-1
KeysOfObjectOrNull.ts
types/utils/KeysOfObjectOrNull.ts
+0
-3
CodeEditorSearchResultItem.tsx
ui/shared/monaco/CodeEditorSearchResultItem.tsx
+1
-1
sortFileTree.ts
ui/shared/monaco/utils/sortFileTree.ts
+1
-1
utils.tsx
ui/tx/state/utils.tsx
+1
-1
No files found.
lib/api/resources.ts
View file @
764f7ea5
...
@@ -42,7 +42,7 @@ import type { TTxsFilters } from 'types/api/txsFilters';
...
@@ -42,7 +42,7 @@ import type { TTxsFilters } from 'types/api/txsFilters';
import
type
{
TxStateChanges
}
from
'
types/api/txStateChanges
'
;
import
type
{
TxStateChanges
}
from
'
types/api/txStateChanges
'
;
import
type
{
VisualizedContract
}
from
'
types/api/visualization
'
;
import
type
{
VisualizedContract
}
from
'
types/api/visualization
'
;
import
type
{
WithdrawalsResponse
}
from
'
types/api/withdrawals
'
;
import
type
{
WithdrawalsResponse
}
from
'
types/api/withdrawals
'
;
import
type
ArrayElement
from
'
types/utils/ArrayElement
'
;
import
type
{
ArrayElement
}
from
'
types/utils
'
;
import
appConfig
from
'
configs/app/config
'
;
import
appConfig
from
'
configs/app/config
'
;
...
...
types/utils.ts
0 → 100644
View file @
764f7ea5
export
type
ArrayElement
<
ArrayType
extends
Array
<
unknown
>>
=
ArrayType
extends
Array
<
(
infer
ElementType
)
>
?
ElementType
:
never
;
export
type
ExcludeNull
<
T
>
=
T
extends
null
?
never
:
T
;
export
type
KeysOfObjectOrNull
<
T
>
=
keyof
ExcludeNull
<
T
>
;
types/utils/ArrayElement.ts
deleted
100644 → 0
View file @
b875a1e2
type
ArrayElement
<
ArrayType
extends
Array
<
unknown
>>
=
ArrayType
extends
Array
<
(
infer
ElementType
)
>
?
ElementType
:
never
;
export
default
ArrayElement
;
types/utils/ExcludeNull.ts
deleted
100644 → 0
View file @
b875a1e2
export
type
ExcludeNull
<
T
>
=
T
extends
null
?
never
:
T
;
types/utils/KeysOfObjectOrNull.ts
deleted
100644 → 0
View file @
b875a1e2
import
type
{
ExcludeNull
}
from
'
./ExcludeNull
'
;
export
type
KeysOfObjectOrNull
<
T
>
=
keyof
ExcludeNull
<
T
>
;
ui/shared/monaco/CodeEditorSearchResultItem.tsx
View file @
764f7ea5
...
@@ -2,7 +2,7 @@ import { Box, chakra } from '@chakra-ui/react';
...
@@ -2,7 +2,7 @@ import { Box, chakra } from '@chakra-ui/react';
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
SearchResult
}
from
'
./types
'
;
import
type
{
SearchResult
}
from
'
./types
'
;
import
type
ArrayElement
from
'
types/utils/ArrayElement
'
;
import
type
{
ArrayElement
}
from
'
types/utils
'
;
import
useThemeColors
from
'
./utils/useThemeColors
'
;
import
useThemeColors
from
'
./utils/useThemeColors
'
;
...
...
ui/shared/monaco/utils/sortFileTree.ts
View file @
764f7ea5
import
type
{
FileTree
}
from
'
../types
'
;
import
type
{
FileTree
}
from
'
../types
'
;
import
type
ArrayElement
from
'
types/utils/ArrayElement
'
;
import
type
{
ArrayElement
}
from
'
types/utils
'
;
export
default
function
sortFileTree
(
a
:
ArrayElement
<
FileTree
>
,
b
:
ArrayElement
<
FileTree
>
)
{
export
default
function
sortFileTree
(
a
:
ArrayElement
<
FileTree
>
,
b
:
ArrayElement
<
FileTree
>
)
{
if
(
'
children
'
in
a
&&
!
(
'
children
'
in
b
))
{
if
(
'
children
'
in
a
&&
!
(
'
children
'
in
b
))
{
...
...
ui/tx/state/utils.tsx
View file @
764f7ea5
...
@@ -3,7 +3,7 @@ import BigNumber from 'bignumber.js';
...
@@ -3,7 +3,7 @@ import BigNumber from 'bignumber.js';
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
TxStateChange
,
TxStateChangeTokenErc1155
,
TxStateChangeTokenErc1155Single
,
TxStateChangeTokenErc721
}
from
'
types/api/txStateChanges
'
;
import
type
{
TxStateChange
,
TxStateChangeTokenErc1155
,
TxStateChangeTokenErc1155Single
,
TxStateChangeTokenErc721
}
from
'
types/api/txStateChanges
'
;
import
type
ArrayElement
from
'
types/utils/ArrayElement
'
;
import
type
{
ArrayElement
}
from
'
types/utils
'
;
import
appConfig
from
'
configs/app/config
'
;
import
appConfig
from
'
configs/app/config
'
;
import
{
ZERO_ADDRESS
}
from
'
lib/consts
'
;
import
{
ZERO_ADDRESS
}
from
'
lib/consts
'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment