- vscode쪽에서 강제로 내는 에러 - .vscode/settings.json 에서 "js/ts.implicitProjectConfig.experimentalDecorators": true 필요
20 lines
416 B
TypeScript
20 lines
416 B
TypeScript
import 'reflect-metadata';
|
|
import { BasicQueryDTO } from './api/index.js';
|
|
import { validate } from 'class-validator';
|
|
|
|
export async function test(){
|
|
console.log("Hello World!");
|
|
|
|
const dto = new BasicQueryDTO();
|
|
dto.command = 'None';
|
|
dto.generalID = 1.1;
|
|
|
|
const result = await validate(dto);
|
|
console.log(result);
|
|
//must be integer가 나타나야함
|
|
}
|
|
|
|
|
|
await test();
|
|
|
|
export default {}; |