Skip to content

Commit 86cf5c1

Browse files
committed
Resolve Socket.Dev False Positive
1 parent 37f835a commit 86cf5c1

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/type/engine/cyclic/extends.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { type TArray, Array, IsArray, ArrayOptions } from '../../types/array.ts'
3636
import { type TAsyncIterator, AsyncIterator, IsAsyncIterator } from '../../types/async-iterator.ts'
3737
import { type TConstructor, Constructor, IsConstructor } from '../../types/constructor.ts'
3838
import { type TCyclic } from '../../types/cyclic.ts'
39-
import { type TFunction, Function, IsFunction } from '../../types/function.ts'
39+
import { type TFunction, Function as _Function, IsFunction } from '../../types/function.ts'
4040
import { type TIntersect, Intersect, IsIntersect } from '../../types/intersect.ts'
4141
import { type TIterator, Iterator, IsIterator } from '../../types/iterator.ts'
4242
import { type TObject, Object, IsObject } from '../../types/object.ts'
@@ -106,7 +106,7 @@ function FromType<Type extends TSchema>(type: Type): TFromType<Type> {
106106
IsArray(type) ? Array(FromType(type.items), ArrayOptions(type)) :
107107
IsAsyncIterator(type) ? AsyncIterator(FromType(type.iteratorItems)) :
108108
IsConstructor(type) ? Constructor(FromTypes(type.parameters), FromType(type.instanceType)) :
109-
IsFunction(type) ? Function(FromTypes(type.parameters), FromType(type.returnType)) :
109+
IsFunction(type) ? _Function(FromTypes(type.parameters), FromType(type.returnType)) :
110110
IsIntersect(type) ? Intersect(FromTypes(type.allOf)) :
111111
IsIterator(type) ? Iterator(FromType(type.iteratorItems)) :
112112
IsObject(type) ? Object(FromProperties(type.properties)) :

src/type/engine/instantiate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import { type TArray, Array, IsArray, ArrayOptions } from '../types/array.ts'
4545
import { type TAsyncIterator, AsyncIterator, IsAsyncIterator, AsyncIteratorOptions } from '../types/async-iterator.ts'
4646
import { type TConstructor, Constructor, IsConstructor, ConstructorOptions } from '../types/constructor.ts'
4747
import { type TDeferred, Deferred, IsDeferred } from '../types/deferred.ts'
48-
import { type TFunction, Function, IsFunction, FunctionOptions } from '../types/function.ts'
48+
import { type TFunction, Function as _Function, IsFunction, FunctionOptions } from '../types/function.ts'
4949
import { type TCall, IsCall } from '../types/call.ts'
5050
import { type TIdentifier } from '../types/identifier.ts'
5151
import { type TIntersect, Intersect, IsIntersect, IntersectOptions } from '../types/intersect.ts'
@@ -369,7 +369,7 @@ export function InstantiateType<Context extends TProperties, State extends TStat
369369
IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) :
370370
IsConstructor(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType) as never, ConstructorOptions(type)) :
371371
IsDeferred(type) ? InstantiateDeferred(context, state, type.action, type.parameters, type.options) :
372-
IsFunction(type) ? Function(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType) as never, FunctionOptions(type)) :
372+
IsFunction(type) ? _Function(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType) as never, FunctionOptions(type)) :
373373
IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) :
374374
IsIterator(type) ? Iterator(InstantiateType(context, state, type.iteratorItems), IteratorOptions(type)) :
375375
IsObject(type) ? Object(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) :

0 commit comments

Comments
 (0)