commit
5ce782aa0f
@ -0,0 +1,2 @@ |
||||
node_modules |
||||
build |
||||
@ -0,0 +1,7 @@ |
||||
module.exports = { |
||||
testEnvironment: "node", |
||||
transform: { |
||||
"^.+.tsx?$": ["ts-jest",{}], |
||||
}, |
||||
|
||||
}; |
||||
@ -0,0 +1,19 @@ |
||||
{ |
||||
"name": "jlc", |
||||
"version": "1.0.0", |
||||
"main": "index.js", |
||||
"author": "Freywar Ulvnaudgari <freywar.ulvnaudgari@gmail.com>", |
||||
"license": "MIT", |
||||
"scripts": { |
||||
"build": "rm -rf build && tsc", |
||||
"run": "yarn build && node build/index.js", |
||||
"debug": "yarn build && node --inspect-brk build/index.js", |
||||
"test": "jest" |
||||
}, |
||||
"devDependencies": { |
||||
"@jest/globals": "^29.7.0", |
||||
"jest": "^29.7.0", |
||||
"ts-jest": "^29.2.3", |
||||
"typescript": "^5.5.4" |
||||
} |
||||
} |
||||
@ -0,0 +1 @@ |
||||
export const id = <T>(v: T) => v; |
||||
@ -0,0 +1,10 @@ |
||||
import { describe, expect, test } from '@jest/globals'; |
||||
import { id } from '../src/core'; |
||||
|
||||
describe('id', () => { |
||||
test('returns same value', () => { |
||||
expect(id(null)).toBe(null); |
||||
expect(id(1)).toBe(1); |
||||
expect(id(global)).toBe(global); |
||||
}); |
||||
}); |
||||
@ -0,0 +1,24 @@ |
||||
{ |
||||
"compilerOptions": { |
||||
"outDir": "build", |
||||
"target": "ES2022", |
||||
"module": "ES2022", |
||||
"moduleResolution": "Node", |
||||
"lib": [ |
||||
"ES2022" |
||||
], |
||||
"noImplicitAny": true, |
||||
"noImplicitOverride": true, |
||||
"noImplicitReturns": true, |
||||
"noImplicitThis": true, |
||||
"noUnusedLocals": true, |
||||
"noUnusedParameters": true, |
||||
"strictNullChecks": true, |
||||
"strictPropertyInitialization": true, |
||||
"declaration": false, |
||||
"sourceMap": true, |
||||
}, |
||||
"include": [ |
||||
"src/**/*.ts", |
||||
], |
||||
} |
||||
Loading…
Reference in new issue