Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
pub
frama-c
Commits
a4714f32
Commit
a4714f32
authored
4 years ago
by
Loïc Correnson
Browse files
Options
Downloads
Patches
Plain Diff
[ivette] better api doc
parent
1fb9b98c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ivette/src/dome/src/renderer/data/json.ts
+9
-3
9 additions, 3 deletions
ivette/src/dome/src/renderer/data/json.ts
with
9 additions
and
3 deletions
ivette/src/dome/src/renderer/data/json.ts
+
9
−
3
View file @
a4714f32
...
...
@@ -52,17 +52,23 @@ export function pretty(js: any) {
/** Decoder for values of type `D`.
You can abbreviate `Safe<D | undefined>` with `Loose<D>`. */
export
type
Safe
<
D
>
=
(
js
?:
json
)
=>
D
;
export
interface
Safe
<
D
>
{
(
js
?:
json
):
D
;
}
/** Decoder for values of type `D`, if any.
Same as `Safe<D | undefined>`. */
export
type
Loose
<
D
>
=
(
js
?:
json
)
=>
D
|
undefined
;
export
interface
Loose
<
D
>
{
(
js
?:
json
):
D
|
undefined
;
}
/**
Encoder for value of type `D`.
In most cases, you only need [[identity]].
*/
export
type
Encoder
<
D
>
=
(
v
:
D
)
=>
json
;
export
interface
Encoder
<
D
>
{
(
v
:
D
):
json
;
}
/** Can be used for most encoders. */
export
function
identity
<
A
>
(
v
:
A
):
A
{
return
v
;
};
...
...
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