Closed EGSP closed 4 months ago
I get function undefined
const response = await fetch('/api/users', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ nickname: $nickname, password: $password }) }); const result: Result<void, string[]> = await response.json() as Result<void, string[]>; console.log(result) if (result.isOk()) { // function undefined console.log('user created'); } else { console.log(result.unwrapErr().join('\n')); } }
I get function undefined