typia
Version:
Superfast runtime validators with only one line
1 lines • 958 B
Source Map (JSON)
{"version":3,"file":"_notationAssign.mjs","names":[],"sources":["../../src/internal/_notationAssign.ts"],"sourcesContent":["import { _notationKeyCollision } from \"./_notationKeyCollision\";\n\nexport const _notationAssign = (\n output: Record<string, any>,\n sources: Record<string, string>,\n source: string,\n value: any,\n rename: (str: string) => string,\n): void => {\n const destination: string = rename(source);\n if (Object.hasOwn(output, destination))\n _notationKeyCollision(sources[destination]!, source, destination);\n Object.defineProperty(output, destination, {\n configurable: true,\n enumerable: true,\n value,\n writable: true,\n });\n sources[destination] = source;\n};\n"],"mappings":";;AAEA,MAAa,mBACX,QACA,SACA,QACA,OACA,WACS;CACT,MAAM,cAAsB,OAAO,MAAM;CACzC,IAAI,OAAO,OAAO,QAAQ,WAAW,GACnC,sBAAsB,QAAQ,cAAe,QAAQ,WAAW;CAClE,OAAO,eAAe,QAAQ,aAAa;EACzC,cAAc;EACd,YAAY;EACZ;EACA,UAAU;CACZ,CAAC;CACD,QAAQ,eAAe;AACzB"}