/
opt
/
canhelp
/
node_modules
/
json-schema-to-ts
/
lib
/
esm
/
utils
/
/opt/canhelp/node_modules/json-schema-to-ts/lib/esm/utils
mkdir
upload
Name
Size
Mode
Actions
type-guards/
-
0755
rm
asConst.js
456
0644
edit
dl
rm
asConst.js.map
784
0644
edit
dl
rm
index.js
153
0644
edit
dl
rm
index.js.map
444
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/json-schema-to-ts/lib/esm/utils/asConst.js.map
(784B)
{"version":3,"sources":["../../../src/utils/asConst.ts"],"names":["asConst","input"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAAQC,KAAR;AAAA,SAAgDA,KAAhD;AAAA,CAAhB","sourcesContent":["import type { Narrow } from \"~/type-utils\";\n\n/**\n * Returns the input parameter without muting it, but narrowing its inferred type. Similar to using the `as const` statement functionnally.\n * @param input Input\n * @returns Input, narrowly typed\n *\n * ```ts\n * const object = { foo: \"bar\" }\n * // { foo: string }\n *\n * const narrowedObject = asConst({ foo: \"bar \"})\n * // => { foo: \"bar\" }\n * ```\n */\nexport const asConst = <INPUT>(input: Narrow<INPUT>): Narrow<INPUT> => input;\n"],"file":"asConst.js"}
Save
cmd:
run