vendor tsgo

This commit is contained in:
2026-07-09 16:50:43 -04:00
parent c06ea2e5a4
commit 98978e4930
5804 changed files with 1556156 additions and 101 deletions

View File

@@ -0,0 +1,32 @@
package collections_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/collections"
"gotest.tools/v3/assert"
)
func TestSyncMapWithNil(t *testing.T) {
t.Parallel()
var m collections.SyncMap[string, any]
got1, ok := m.Load("foo")
assert.Assert(t, !ok)
assert.Equal(t, got1, nil)
m.Store("foo", nil)
got2, ok := m.Load("foo")
assert.Assert(t, ok)
assert.Equal(t, got2, nil)
too, loaded := m.LoadOrStore("too", nil)
assert.Assert(t, !loaded)
assert.Equal(t, too, nil)
m.Range(func(k string, v any) bool {
return true
})
}