Skip to content

Commit 8e2bf59

Browse files
committed
remove dtslint
1 parent 8f48e25 commit 8e2bf59

114 files changed

Lines changed: 1548 additions & 3285 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 393 additions & 286 deletions
Large diffs are not rendered by default.

docs/README.md

Lines changed: 393 additions & 286 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"test:file": "node scripts/tasks/run/run-test.js",
1515
"test:ci": "vitest run",
1616
"test": "vitest run --watch -u",
17-
"test:typings": "dtslint --localTs ./node_modules/typescript/lib --expectOnly ./source",
17+
"test:typings": "vitest run --config vitest.typings.config.js",
1818
"create-docsify": "cd ../rambda-scripts && yarn create-docsify",
1919
"deps": "run dep:next 10",
2020
"x": "run dep:stable 10",
@@ -23,14 +23,6 @@
2323
"niketaScripts": {
2424
"**/*.js": "yarn test:file"
2525
},
26-
"depFn": [
27-
"@definitelytyped/dtslint",
28-
"vitest",
29-
"typescript",
30-
"@vitest/coverage-v8",
31-
"@types/mocha",
32-
"@types/node"
33-
],
3426
"type": "module",
3527
"exports": {
3628
"require": {
@@ -44,10 +36,9 @@
4436
"module": "dist/rambda.js",
4537
"dependencies": {},
4638
"devDependencies": {
47-
"@definitelytyped/dtslint": "0.0.182",
4839
"@types/mocha": "10.0.10",
49-
"@types/node": "24.10.1",
50-
"@vitest/coverage-v8": "4.0.10",
40+
"@types/node": "25.8.0",
41+
"@vitest/coverage-v8": "5.0.0-beta.2",
5142
"helpers-fn": "2.1.1",
5243
"lodash": "4.18.1",
5344
"radashi": "13.0.0-beta.ffa4778",
@@ -56,8 +47,8 @@
5647
"remeda": "2.34.1",
5748
"rollup": "4.60.4",
5849
"types-ramda": "0.31.0",
59-
"typescript": "6.0.0-dev.20251119",
60-
"vitest": "4.0.10"
50+
"typescript": "6.0.3",
51+
"vitest": "5.0.0-beta.2"
6152
},
6253
"jest": {
6354
"testEnvironment": "node",

source/addProp-spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { addProp, pipe } from 'rambda'
2+
import { expectTypeOf, it } from 'vitest'
23

34
it('R.addProp', () => {
45
const result = pipe({ a: 1, b: 'foo' }, addProp('c', 3))
5-
result.a // $ExpectType number
6-
result.b // $ExpectType string
7-
result.c // $ExpectType number
6+
expectTypeOf(result.a).toEqualTypeOf<number>()
7+
expectTypeOf(result.b).toEqualTypeOf<string>()
8+
expectTypeOf(result.c).toEqualTypeOf<number>()
89
})

source/addPropToObjects-spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { addPropToObjects, pipe } from 'rambda'
2+
import { expectTypeOf, it } from 'vitest'
23

34
it('R.addPropToObjects', () => {
45
let result = pipe(
@@ -11,5 +12,5 @@ it('R.addPropToObjects', () => {
1112
(x) => String(x.a + x.b),
1213
)
1314
)
14-
result // $ExpectType { a: number; b: number; c: string; }[]
15+
expectTypeOf(result).toEqualTypeOf<{ a: number; b: number; c: string; }[]>()
1516
})

source/all-spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import * as R from 'rambda'
2+
import { describe, expectTypeOf, it } from 'vitest'
23

34
describe('all', () => {
45
it('happy', () => {
56
const result = R.pipe(
67
[1, 2, 3],
78
R.all(x => {
8-
x // $ExpectType number
9+
expectTypeOf(x).toEqualTypeOf<number>()
910
return x > 0
1011
}),
1112
)
12-
result // $ExpectType boolean
13+
expectTypeOf(result).toEqualTypeOf<boolean>()
1314
})
1415
})

source/allPass-spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as R from 'rambda'
2+
import { describe, expectTypeOf, it } from 'vitest'
23

34
describe('allPass', () => {
45
it('happy', () => {
@@ -10,6 +11,6 @@ describe('allPass', () => {
1011
(x) => x.length > 2,
1112
(x) => x.includes(3)
1213
])))
13-
result // $ExpectType boolean[]
14+
expectTypeOf(result).toEqualTypeOf<boolean[]>()
1415
})
1516
})

source/any-spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { any, pipe } from 'rambda'
2+
import { expectTypeOf, it } from 'vitest'
23

34
it('R.any', () => {
45
const result = pipe(
56
[1, 2, 3],
67
any(x => {
7-
x // $ExpectType number
8+
expectTypeOf(x).toEqualTypeOf<number>()
89
return x > 2
910
}),
1011
)
11-
result // $ExpectType boolean
12+
expectTypeOf(result).toEqualTypeOf<boolean>()
1213
})

source/anyPass-spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
import { anyPass, filter } from 'rambda'
2+
import { describe, expectTypeOf, it } from 'vitest'
23

34
describe('anyPass', () => {
45
it('issue #604', () => {
56
const plusEq = (w: number, x: number, y: number, z: number) => w + x === y + z
67
const result = anyPass([plusEq])(3, 3, 3, 3)
78

8-
result // $ExpectType boolean
9+
expectTypeOf(result).toEqualTypeOf<boolean>()
910
})
1011
it('issue #642', () => {
1112
const isGreater = (num: number) => num > 5
1213
const pred = anyPass([isGreater])
1314
const xs = [0, 1, 2, 3]
1415

1516
const filtered1 = filter(pred)(xs)
16-
filtered1 // $ExpectType number[]
17+
expectTypeOf(filtered1).toEqualTypeOf<number[]>()
1718
const filtered2 = xs.filter(pred)
18-
filtered2 // $ExpectType number[]
19+
expectTypeOf(filtered2).toEqualTypeOf<number[]>()
1920
})
2021
it('functions as a type guard', () => {
2122
const isString = (x: unknown): x is string => typeof x === 'string'
@@ -27,7 +28,7 @@ describe('anyPass', () => {
2728
const aValue: unknown = 1
2829

2930
if (isStringNumberOrBoolean(aValue)) {
30-
aValue // $ExpectType string | number | boolean
31+
expectTypeOf(aValue).toEqualTypeOf<string | number | boolean>()
3132
}
3233
})
3334
})

source/append-spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import { append, pipe, prepend } from 'rambda'
2+
import { describe, expectTypeOf, it } from 'vitest'
23

34
const listOfNumbers = [1, 2, 3]
45

56
describe('R.append/R.prepend', () => {
67
it('happy', () => {
78
const result = pipe(listOfNumbers, append(4), prepend(0))
8-
result // $ExpectType number[]
9+
expectTypeOf(result).toEqualTypeOf<number[]>()
910
})
1011
it('with object', () => {
1112
const result = pipe([{ a: 1 }], append({ a: 10 }), prepend({ a: 20 }))
12-
result // $ExpectType { a: number; }[]
13+
expectTypeOf(result).toEqualTypeOf<{ a: number; }[]>()
1314
})
1415
})

0 commit comments

Comments
 (0)