Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Anderson, Danny H
gist-charts
Commits
af867d0a
Commit
af867d0a
authored
Sep 13, 2018
by
David Anderson
Browse files
makeList is generic instead of any
parent
69bf0ccf
Changes
1
Hide whitespace changes
Inline
Side-by-side
gist-charts/source/utility/makeList.method.ts
View file @
af867d0a
export
function
makeList
(
x
:
any
|
Array
<
any
>
):
Array
<
any
>
{
let
ret
:
Array
<
any
>
;
export
function
makeList
<
T
=
any
>
(
x
:
T
|
Array
<
T
>
):
Array
<
T
>
{
let
ret
:
Array
<
T
>
;
if
(
x
instanceof
Array
)
{
ret
=
x
;
}
else
if
(
x
!==
undefined
)
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment