(value: Value)
| 82 | } |
| 83 | |
| 84 | export function toString(value: Value): string { |
| 85 | switch (value.type) { |
| 86 | case 'number': |
| 87 | return value.value.toString(); |
| 88 | case 'float': |
| 89 | throw VimError.UsingFloatAsAString(); |
| 90 | case 'string': |
| 91 | return value.value; |
| 92 | case 'list': |
| 93 | throw VimError.UsingListAsAString(); |
| 94 | case 'dictionary': |
| 95 | throw VimError.UsingDictionaryAsAString(); |
| 96 | case 'funcref': |
| 97 | throw VimError.UsingFuncrefAsAString(); |
| 98 | case 'blob': |
| 99 | return displayValue(value); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | function toList(value: Value): ListValue { |
| 104 | switch (value.type) { |
no test coverage detected