Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
340
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
27
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
811ffbf3
Commit
811ffbf3
authored
9 months ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
remove unused file
parent
bf333820
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!620
Bump version
,
!583
misskey 2024.7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/backend/src/misc/prelude/maybe.ts
+0
-25
0 additions, 25 deletions
packages/backend/src/misc/prelude/maybe.ts
packages/backend/test/prelude/maybe.ts
+0
-23
0 additions, 23 deletions
packages/backend/test/prelude/maybe.ts
with
0 additions
and
48 deletions
packages/backend/src/misc/prelude/maybe.ts
deleted
100644 → 0
+
0
−
25
View file @
bf333820
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
export
interface
IMaybe
<
T
>
{
isJust
():
this
is
IJust
<
T
>
;
}
export
interface
IJust
<
T
>
extends
IMaybe
<
T
>
{
get
():
T
;
}
export
function
just
<
T
>
(
value
:
T
):
IJust
<
T
>
{
return
{
isJust
:
()
=>
true
,
get
:
()
=>
value
,
};
}
export
function
nothing
<
T
>
():
IMaybe
<
T
>
{
return
{
isJust
:
()
=>
false
,
};
}
This diff is collapsed.
Click to expand it.
packages/backend/test/prelude/maybe.ts
deleted
100644 → 0
+
0
−
23
View file @
bf333820
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import
*
as
assert
from
'
assert
'
;
import
{
just
,
nothing
}
from
'
../../src/misc/prelude/maybe.js
'
;
describe
(
'
just
'
,
()
=>
{
test
(
'
has a value
'
,
()
=>
{
assert
.
deepStrictEqual
(
just
(
3
).
isJust
(),
true
);
});
test
(
'
has the inverse called get
'
,
()
=>
{
assert
.
deepStrictEqual
(
just
(
3
).
get
(),
3
);
});
});
describe
(
'
nothing
'
,
()
=>
{
test
(
'
has no value
'
,
()
=>
{
assert
.
deepStrictEqual
(
nothing
().
isJust
(),
false
);
});
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment