Skip to content

Commit

Permalink
refactor: Rename all exported modules to infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
eythaann committed Oct 2, 2023
1 parent 6eb4cc2 commit 265351b
Show file tree
Hide file tree
Showing 38 changed files with 91 additions and 91 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IsAny } from '.';
import { IsAny } from './infrastructure';

describeType('IsAny', () => {
testType('Should return true only for type any', [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { IsAny } from '../any';
import { IsAny } from '../any/infrastructure';
import { IsType } from '../app';
import { Or } from '../booleans';
import { Equals } from '../comparison';
import { If } from '../conditions';
import { IsNever } from '../never';
import { StrToNumber } from '../numbers';
import { Or } from '../booleans/infrastructure';
import { Equals } from '../comparison/infrastructure';
import { If } from '../conditions/infrastructure';
import { IsNever } from '../never/infrastructure';
import { StrToNumber } from '../numbers/infrastructure';
import { Substract } from '../numbers/math/infrastructure';
import { startsWith } from '../strings';
import { startsWith } from '../strings/infrastructure';

/**
* Evaluates if the specified type is an array.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IsArray, IsEmptyArray, IsTuple, Pop, PopRecursive, Shift, ShiftRecursive, Tuple, getTupleIndexes, UnionToTupleCombination, TupleIncludes } from '.';
import { IsArray, IsEmptyArray, IsTuple, Pop, PopRecursive, Shift, ShiftRecursive, Tuple, getTupleIndexes, UnionToTupleCombination, TupleIncludes } from './infrastructure';

describeType('IsArray', () => {
testType('Should return true for array types', [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { IsType } from '../app';
import { nLengthTuple } from '../arrays-and-tuples';
import { If } from '../conditions';
import { Cast } from '../generals';
import { IsNever } from '../never';
import { nLengthTuple } from '../arrays-and-tuples/infrastructure';
import { If } from '../conditions/infrastructure';
import { Cast } from '../generals/infrastructure';
import { IsNever } from '../never/infrastructure';

/**
* Evaluates if the specified type is a boolean.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { All, And, Every, IsBoolean, Or, Some, Not, NotIf, XOR, IsTrue, IsFalse } from '.';
import { All, And, Every, IsBoolean, Or, Some, Not, NotIf, XOR, IsTrue, IsFalse } from './infrastructure';

describeType('IsBoolean', () => {
testType('Should return true only for boolean', [
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/comparison/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AnyFunction } from '../functions';
import { AnyObject } from '../objects';
import { AnyFunction } from '../functions/infrastructure';
import { AnyObject } from '../objects/infrastructure';

export type binaryMap<T> = {
1: false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { _RT } from '../..';
import { Prettify } from '../objects';
import { Prettify } from '../objects/infrastructure';
import { AND, If, IsAny, IsStrictObject, IsSubTypeBinary, IsSuperTypeBinary, OR, toBoolean } from './app';

type _EqualsObject<_A, _B, A = Prettify<_A>, B = Prettify<_B>> =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Equals, IsSubType, IsSuperType } from '.';
import { Equals, IsSubType, IsSuperType } from './infrastructure';

describeType('Equals', () => {
testType('Basic Cases', [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { If } from '.';
import { If } from './infrastructure';

describeType('If', () => {
testType('Should return TrueCase if Condition is true', [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IsFunction } from '.';
import { IsFunction } from './infrastructure';

describeType('IsFunction', () => {
testType('Should return true only for function', [
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/generals/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IsAny } from '../any';
import { IsNever } from '../never';
import { IsAny } from '../any/infrastructure';
import { IsNever } from '../never/infrastructure';

export type IsType<
TypeToTest,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Cast, KeysOfUnion, Opaque, UnionToIntersection, ValueOf, WeakOpaque } from '.';
import { Cast, KeysOfUnion, Opaque, UnionToIntersection, ValueOf, WeakOpaque } from './infrastructure';

describeType('ValueOf', () => {
testType('Should return the union of the value types', [
Expand Down
30 changes: 15 additions & 15 deletions lib/modules/infrastructure.d.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
export * from './any';
export * from './arrays-and-tuples';
export * from './booleans';
export * from './comparison';
export * from './conditions';
export * from './functions';
export * from './generals';
export * from './never';
export * from './numbers';
export * from './any/infrastructure';
export * from './arrays-and-tuples/infrastructure';
export * from './booleans/infrastructure';
export * from './comparison/infrastructure';
export * from './conditions/infrastructure';
export * from './functions/infrastructure';
export * from './generals/infrastructure';
export * from './never/infrastructure';
export * from './numbers/infrastructure';
export * from './numbers/math/infrastructure';
export * from './objects';
export * from './promises';
export * from './strings';
export * from './undefined';
export * from './unknow';
export * from './iterators';
export * from './objects/infrastructure';
export * from './promises/infrastructure';
export * from './strings/infrastructure';
export * from './undefined/infrastructure';
export * from './unknow/infrastructure';
export * from './iterators/infrastructure';
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ForceExtract, ForceToString } from '../app';
import { nLengthTuple } from '../arrays-and-tuples';
import { nLengthTuple } from '../arrays-and-tuples/infrastructure';
import { forceConcat } from '../arrays-and-tuples/app';
import { IsTrue } from '../booleans';
import { Cast } from '../generals';
import { IsTrue } from '../booleans/infrastructure';
import { Cast } from '../generals/infrastructure';
import { InternalAdd } from '../numbers/math/app/addition';

export namespace IteratorHKT {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { IsNever } from '.';
import { AnyFunction } from '../functions';
import { AnyObject } from '../objects';
import { IsNever } from './infrastructure';
import { AnyFunction } from '../functions/infrastructure';
import { AnyObject } from '../objects/infrastructure';

describeType('IsNever', () => {
describeType('Should returns false', () => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { IsNumber } from '.';
import { AnyFunction } from '../functions';
import { AnyObject } from '../objects';
import { IsNumber } from './infrastructure';
import { AnyFunction } from '../functions/infrastructure';
import { AnyObject } from '../objects/infrastructure';

describeType('IsNumber', () => {
testType('Should return false if type is not a number', [
Expand Down
8 changes: 4 additions & 4 deletions lib/modules/numbers/math/app/addition.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ForceExtract, ForceToString } from '../../../app';
import { forceConcat, Pop } from '../../../arrays-and-tuples/app';
import { And } from '../../../booleans';
import { Equals } from '../../../comparison';
import { If } from '../../../conditions';
import { Split, TupleToString } from '../../../strings';
import { And } from '../../../booleans/infrastructure';
import { Equals } from '../../../comparison/infrastructure';
import { If } from '../../../conditions/infrastructure';
import { Split, TupleToString } from '../../../strings/infrastructure';
import { CarryOnAddition, DecimalHashMap } from '../domain';

type ToDecimal<str> = ForceExtract<DecimalHashMap[0], str>;
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/numbers/math/app/arimetic.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ForceExtract, ForceToString } from '../../../app';
import { Shift } from '../../../arrays-and-tuples';
import { Split } from '../../../strings';
import { Shift } from '../../../arrays-and-tuples/infrastructure';
import { Split } from '../../../strings/infrastructure';
import { ToDecimal } from './addition';

interface BiggerTable {
Expand Down
8 changes: 4 additions & 4 deletions lib/modules/numbers/math/app/sustraction.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ForceExtract, ForceToString } from '../../../app';
import { forceConcat, Pop } from '../../../arrays-and-tuples/app';
import { And } from '../../../booleans';
import { Equals } from '../../../comparison';
import { If } from '../../../conditions';
import { Split, TupleToString } from '../../../strings';
import { And } from '../../../booleans/infrastructure';
import { Equals } from '../../../comparison/infrastructure';
import { If } from '../../../conditions/infrastructure';
import { Split, TupleToString } from '../../../strings/infrastructure';
import { CarryOnAddition, DecimalHashMap } from '../domain';
import { ToDecimal } from './addition';
import { InternalBiggerThan } from './arimetic';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { KeyOfObject, Modify, Prettify } from '.';
import { ShiftRecursive, UnionToTupleCombination } from '../arrays-and-tuples';
import { Cast } from '../generals';
import { KeyOfObject, Modify, Prettify } from '../infrastructure';
import { ShiftRecursive, UnionToTupleCombination } from '../../arrays-and-tuples/infrastructure';
import { Cast } from '../../generals/infrastructure';

type _ModifyByTuple<T, U, V, Result = T> = V extends []
? Result
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Modify } from '.';
import { ForceExtract, ForceToString } from '../app';
import { getTupleIndexes, nLengthTuple } from '../arrays-and-tuples';
import { forceConcat } from '../arrays-and-tuples/app';
import { TupleReduceHKT, UnionMapHKT, IteratorHKT } from '../iterators';
import { IsNever } from '../never';
import { InternalAdd } from '../numbers/math/app/addition';
import { InternalBiggerThan } from '../numbers/math/app/arimetic';
import { Modify } from '../infrastructure';
import { ForceExtract, ForceToString } from '../../app';
import { getTupleIndexes, nLengthTuple } from '../../arrays-and-tuples/infrastructure';
import { forceConcat } from '../../arrays-and-tuples/app';
import { TupleReduceHKT, UnionMapHKT, IteratorHKT } from '../../iterators/infrastructure';
import { IsNever } from '../../never/infrastructure';
import { InternalAdd } from '../../numbers/math/app/addition';
import { InternalBiggerThan } from '../../numbers/math/app/arimetic';

interface createGroup<L, Result extends unknown[], lastKey> extends IteratorHKT.Union {
return: InternalBiggerThan<[lastKey], [this['current']]> extends true
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { AnyObject, KeyOfObject } from './types';
import { IsAny } from '../any';
import { IsEmptyArray, IsTuple } from '../arrays-and-tuples';
import { And, Not, Or } from '../booleans';
import { Equals } from '../comparison';
import { If } from '../conditions';
import { IsNever } from '../never';
import { IsUnknown } from '../unknow';
import { AnyFunction } from '../functions';
import { KeysOfUnion } from '../generals';
import { NonUndefined } from '../undefined';
import { AnyObject, KeyOfObject } from './domain';
import { IsAny } from '../any/infrastructure';
import { IsEmptyArray, IsTuple } from '../arrays-and-tuples/infrastructure';
import { And, Not, Or } from '../booleans/infrastructure';
import { Equals } from '../comparison/infrastructure';
import { If } from '../conditions/infrastructure';
import { IsNever } from '../never/infrastructure';
import { IsUnknown } from '../unknow/infrastructure';
import { AnyFunction } from '../functions/infrastructure';
import { KeysOfUnion } from '../generals/infrastructure';
import { NonUndefined } from '../undefined/infrastructure';
import { IfSingleLine } from '../conditions/app';

export * from './ModifyPlusOrderedCombinations';
export * from './ModifyPlusCombinations';
export * from './types';
export * from './app/ModifyPlusOrderedCombinations';
export * from './app/ModifyPlusCombinations';
export * from './domain';

/**
* Return true if type is of type object array or function
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AnyObject, CanBeEmptyObject, HasProperty, IsObject, IsStrictObject, Modify, ModifyByKey, NoReadonlyKeys, OptionalKeys, PickByValue, Prettify, ReadonlyKeys, RequiredKeys, SomeToPartial, SomeToReadonly, SomeToRequired, SomeToWritable } from '.';
import { AnyFunction } from '../functions';
import { AnyObject, CanBeEmptyObject, HasProperty, IsObject, IsStrictObject, Modify, ModifyByKey, NoReadonlyKeys, OptionalKeys, PickByValue, Prettify, ReadonlyKeys, RequiredKeys, SomeToPartial, SomeToReadonly, SomeToRequired, SomeToWritable } from './infrastructure';
import { AnyFunction } from '../functions/infrastructure';

describeType('IsObject', () => {
testType('Should return false if type is not of type object, array or func', [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { If } from '../conditions';
import { IsNever } from '../never';
import { If } from '../conditions/infrastructure';
import { IsNever } from '../never/infrastructure';

/**
* Evaluates if the specified type is a Promise.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IsPromise } from '.';
import { IsPromise } from './infrastructure';

describeType('IsPromise', () => {
testType('Should return true for Promise types', [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IsString, Split, SplitReverce, Stringtify, TupleToString, startsWith } from '.';
import { IsString, Split, SplitReverce, Stringtify, TupleToString, startsWith } from './infrastructure';

describeType('IsString', () => {
testType('Should return true only for string', [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IsNull, IsUndefined, NonNull, NonUndefined } from '.';
import { IsNull, IsUndefined, NonNull, NonUndefined } from './infrastructure';

describeType('IsUndefined', () => {
testType('Should return true only for undefined', [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IsAny } from '../any';
import { IsAny } from '../any/infrastructure';

/**
* Evaluates if the specified type is `unknown`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IsUnknown } from '.';
import { IsUnknown } from './infrastructure';

describeType('IsUnknown', () => {
testType('Should return true only for type unknown', [
Expand Down

0 comments on commit 265351b

Please sign in to comment.