fix exports; remove tests

This commit is contained in:
Rowan 2025-05-16 22:23:44 -05:00
parent b2f19f1e0c
commit 1e3d8588ac
3 changed files with 3 additions and 37 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
out/
node_modules/
src/test.ts

View file

@ -1,4 +1,6 @@
export * as ser from './ser'
export * as de from './de'
export * as json from './json'
export * from './decorator'
export * from './options'

View file

@ -1,37 +0,0 @@
import { CaseConvention } from './case'
import { deserialize } from './de'
import { Serde, serde } from './decorator'
import { fromString, toString } from './json'
import { serialize } from './ser'
const InnerStruct = deserialize(serialize(
class {
c = 'awawa'
}))
const TestStruct = deserialize(serialize(
serde({ renameAll: CaseConvention.PascalCase })(
class {
a = 1
b
inner = new InnerStruct()
d = true
e = Math.pow(2, 53)
f = Symbol('test')
g = [1, 'a', [3]]
constructor() {
this.b = new Map()
this.b.set('test key', 2)
}
})))
const test = new TestStruct()
console.log(test)
const value = toString(test)
console.log('A', value)
const test2 = fromString(value, TestStruct)
console.log(test2)