Skip to content

Commit

Permalink
docs: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Lioness100 committed Feb 11, 2023
1 parent 8aa042d commit fda5fff
Show file tree
Hide file tree
Showing 22 changed files with 56 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ServiceInjectingItself {
}

@Injectable()
class ServiceInjectingItselfForwared {
class ServiceInjectingItselfForward {
constructor(
@Inject(forwardRef(() => ServiceInjectingItself))
private readonly coreService: ServiceInjectingItself,
Expand All @@ -24,7 +24,7 @@ class ServiceInjectingItselfViaCustomToken {
export class SelfInjectionProviderModule {}

@Module({
providers: [ServiceInjectingItselfForwared],
providers: [ServiceInjectingItselfForward],
})
export class SelfInjectionForwardProviderModule {}

Expand Down
2 changes: 1 addition & 1 deletion integration/send-files/e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const sendHttpRequest = async (url: URL) => {
res.on('data', chunk => {
// no op
});
// fail the test if somethin goes wrong
// fail the test if something goes wrong
res.on('error', err => {
reject(err);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/common/cache/interceptors/cache.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class CacheInterceptor implements NestInterceptor {
await this.cacheManager.set(...args);
} catch (err) {
Logger.error(
`An error has occured when inserting "key: ${key}", "value: ${response}"`,
`An error has occurred when inserting "key: ${key}", "value: ${response}"`,
'CacheInterceptor',
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class ConfigurableModuleBuilder<

/**
* Registers the "extras" object (a set of extra options that can be used to modify the dynamic module definition).
* Values you specify within the "extras" object will be used as default values (that can be overriden by module consumers).
* Values you specify within the "extras" object will be used as default values (that can be overridden by module consumers).
*
* This method also applies the so-called "module definition transform function" that takes the auto-generated
* dynamic module object ("DynamicModule") and the actual consumer "extras" object as input parameters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('mixin', () => {
expect(type.name).to.not.eql('Test');
});

it('should not lost the design:parmatypes metadata', () => {
it('should not lost the design:paramtypes metadata', () => {
const type = mixin(Test);
const constructorParams = Reflect.getMetadata('design:paramtypes', type);

Expand Down
2 changes: 1 addition & 1 deletion packages/common/test/exceptions/http.exception.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ describe('HttpException', () => {
expect(cause).to.be.eql(errorCause);
});

it('configures a cause when using a bult-in exception with options', () => {
it('configures a cause when using a built-in exception with options', () => {
const builtInErrorClasses = [
BadGatewayException,
BadRequestException,
Expand Down
6 changes: 3 additions & 3 deletions packages/common/test/pipes/validation.pipe.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class TestModel {
public optionalProp: string;
}

class TestModelNoValidaton {
class TestModelNoValidation {
constructor() {}

public prop1: string;
Expand Down Expand Up @@ -367,7 +367,7 @@ describe('ValidationPipe', () => {
});
});
});
describe('when type doesnt match', () => {
describe("when type doesn't match", () => {
describe('when validation rules are applied', () => {
it('should throw an error', async () => {
target = new ValidationPipe();
Expand All @@ -389,7 +389,7 @@ describe('ValidationPipe', () => {
{ prop1: 'value1', prop2: 'value2', prop3: 'value3' },
];

const objMetadata = { ...metadata, metatype: TestModelNoValidaton };
const objMetadata = { ...metadata, metatype: TestModelNoValidation };
const result = await target.transform(testObj, objMetadata);

expect(result).to.not.be.instanceOf(TestModel);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/errors/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const getInstanceName = (instance: unknown): string => {
* Returns the name of the dependency
* Tries to get the class name, otherwise the string value
* (= injection token). As fallback it returns '+'
* @param dependency The dependency whichs name should get displayed
* @param dependency The name of the dependency to be displayed
*/
const getDependencyName = (dependency: InjectorDependency): string =>
// use class name
Expand Down
4 changes: 2 additions & 2 deletions packages/core/injector/helpers/transient-instances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { InstanceToken } from '../module';

/**
* Returns the instances which are transient
* @param instances The instances which should be checked whether they are transcient
* @param instances The instances which should be checked whether they are transient
*/
export function getTransientInstances(
instances: [InstanceToken, InstanceWrapper][],
Expand All @@ -20,7 +20,7 @@ export function getTransientInstances(

/**
* Returns the instances which are not transient
* @param instances The instances which should be checked whether they are transcient
* @param instances The instances which should be checked whether they are transient
*/
export function getNonTransientInstances(
instances: [InstanceToken, InstanceWrapper][],
Expand Down
6 changes: 3 additions & 3 deletions packages/core/repl/repl-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ export class ReplContext {

this.nativeFunctions.set(nativeFunction.fnDefinition.name, nativeFunction);

nativeFunction.fnDefinition.aliases?.forEach(aliaseName => {
nativeFunction.fnDefinition.aliases?.forEach(aliasName => {
const aliasNativeFunction: InstanceType<ReplFunctionClass> =
Object.create(nativeFunction);
aliasNativeFunction.fnDefinition = {
name: aliaseName,
name: aliasName,
description: aliasNativeFunction.fnDefinition.description,
signature: aliasNativeFunction.fnDefinition.signature,
};
this.nativeFunctions.set(aliaseName, aliasNativeFunction);
this.nativeFunctions.set(aliasName, aliasNativeFunction);
nativeFunctions.push(aliasNativeFunction);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/helpers/context-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('ContextUtils', () => {
});
});
describe('mergeParamsMetatypes', () => {
it('should return "paramsProperties" when paramtypes array doesnt exists', () => {
it('should return "paramsProperties" when paramtypes array doesn\'t exists', () => {
const paramsProperties = ['1'];
expect(
contextUtils.mergeParamsMetatypes(paramsProperties as any, null),
Expand Down
42 changes: 21 additions & 21 deletions packages/core/test/injector/instance-wrapper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ describe('InstanceWrapper', () => {
});
describe('when statically scoped', () => {
describe('dependencies, properties, enhancers', () => {
describe('dependecies non static, properties static, enhancers static', () => {
describe('dependencies non static, properties static, enhancers static', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper();
wrapper.addCtorMetadata(
Expand All @@ -110,7 +110,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeStatic()).to.be.false;
});
});
describe('dependecies static, properties non static, enhancers static', () => {
describe('dependencies static, properties non static, enhancers static', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper();
wrapper.addCtorMetadata(0, new InstanceWrapper());
Expand All @@ -122,7 +122,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeStatic()).to.be.false;
});
});
describe('dependecies static, properties static, enhancers non static', () => {
describe('dependencies static, properties static, enhancers non static', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper();
wrapper.addCtorMetadata(0, new InstanceWrapper());
Expand Down Expand Up @@ -268,7 +268,7 @@ describe('InstanceWrapper', () => {
});
describe('when statically scoped', () => {
describe('dependencies, properties, enhancers', () => {
describe('dependecies non durable, properties non durable, enhancers durable', () => {
describe('dependencies non durable, properties non durable, enhancers durable', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper();
wrapper.addCtorMetadata(
Expand All @@ -281,7 +281,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeDurable()).to.be.false;
});
});
describe('dependecies non durable, properties durable, enhancers durable', () => {
describe('dependencies non durable, properties durable, enhancers durable', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper();
wrapper.addCtorMetadata(
Expand All @@ -297,7 +297,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeDurable()).to.be.false;
});
});
describe('dependecies non durable, properties durable', () => {
describe('dependencies non durable, properties durable', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper();
wrapper.addCtorMetadata(
Expand Down Expand Up @@ -342,14 +342,14 @@ describe('InstanceWrapper', () => {
});
});
describe('dependencies', () => {
describe('when wrapper is non durable and dependecy is static', () => {
describe('when wrapper is non durable and dependency is static', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper({ scope: Scope.REQUEST });
wrapper.addCtorMetadata(0, new InstanceWrapper());
expect(wrapper.isDependencyTreeDurable()).to.be.false;
});
});
describe('when wrapper is durable and dependecy is static', () => {
describe('when wrapper is durable and dependency is static', () => {
it('should return true', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand All @@ -359,7 +359,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeDurable()).to.be.true;
});
});
describe('when wrapper is non durable and dependecy is durable', () => {
describe('when wrapper is non durable and dependency is durable', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand All @@ -371,7 +371,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeDurable()).to.be.false;
});
});
describe('when wrapper is durable and dependecy is static', () => {
describe('when wrapper is durable and dependency is static', () => {
it('should return true', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand All @@ -381,7 +381,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeDurable()).to.be.true;
});
});
describe('when wrapper is durable and dependecy is non durable', () => {
describe('when wrapper is durable and dependency is non durable', () => {
it('should return true', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand Down Expand Up @@ -450,14 +450,14 @@ describe('InstanceWrapper', () => {
});
});
describe('properties', () => {
describe('when wrapper is non durable and dependecy is static', () => {
describe('when wrapper is non durable and dependency is static', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper({ scope: Scope.REQUEST });
wrapper.addPropertiesMetadata('key1', new InstanceWrapper());
expect(wrapper.isDependencyTreeDurable()).to.be.false;
});
});
describe('when wrapper is durable and dependecy is static', () => {
describe('when wrapper is durable and dependency is static', () => {
it('should return true', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand All @@ -467,7 +467,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeDurable()).to.be.true;
});
});
describe('when wrapper is non durable and dependecy is durable', () => {
describe('when wrapper is non durable and dependency is durable', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand All @@ -479,7 +479,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeDurable()).to.be.false;
});
});
describe('when wrapper is durable and dependecy is static', () => {
describe('when wrapper is durable and dependency is static', () => {
it('should return true', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand All @@ -489,7 +489,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeDurable()).to.be.true;
});
});
describe('when wrapper is durable and dependecy is non durable', () => {
describe('when wrapper is durable and dependency is non durable', () => {
it('should return true', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand Down Expand Up @@ -549,14 +549,14 @@ describe('InstanceWrapper', () => {
});
});
describe('enhancers', () => {
describe('when wrapper is non durable and dependecy is static', () => {
describe('when wrapper is non durable and dependency is static', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper({ scope: Scope.REQUEST });
wrapper.addEnhancerMetadata(new InstanceWrapper());
expect(wrapper.isDependencyTreeDurable()).to.be.false;
});
});
describe('when wrapper is durable and dependecy is static', () => {
describe('when wrapper is durable and dependency is static', () => {
it('should return true', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand All @@ -566,7 +566,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeDurable()).to.be.true;
});
});
describe('when wrapper is non durable and dependecy is durable', () => {
describe('when wrapper is non durable and dependency is durable', () => {
it('should return false', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand All @@ -577,7 +577,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeDurable()).to.be.false;
});
});
describe('when wrapper is durable and dependecy is static', () => {
describe('when wrapper is durable and dependency is static', () => {
it('should return true', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand All @@ -587,7 +587,7 @@ describe('InstanceWrapper', () => {
expect(wrapper.isDependencyTreeDurable()).to.be.true;
});
});
describe('when wrapper is durable and dependecy is non durable', () => {
describe('when wrapper is durable and dependency is non durable', () => {
it('should return true', () => {
const wrapper = new InstanceWrapper({
scope: Scope.REQUEST,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/router/router-explorer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ describe('RouterExplorer', () => {
instance: { [methodKey]: {} },
});

it('should delegete error to exception filters', async () => {
it('should delegate error to exception filters', async () => {
const handler = routerBuilder.createRequestScopedHandler(
wrapper,
RequestMethod.ALL,
Expand Down
6 changes: 3 additions & 3 deletions packages/core/test/scanner.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,21 +260,21 @@ describe('DependenciesScanner', () => {

expect(module.forwardRef.called).to.be.true;
});
it('should throw "InvalidClassModuleException" exception when suppling a class annotated with `@Injectable()` decorator', () => {
it('should throw "InvalidClassModuleException" exception when supplying a class annotated with `@Injectable()` decorator', () => {
sinon.stub(container, 'addModule').returns({} as any);

expect(scanner.insertModule(TestComponent, [])).to.be.rejectedWith(
InvalidClassModuleException,
);
});
it('should throw "InvalidClassModuleException" exception when suppling a class annotated with `@Controller()` decorator', () => {
it('should throw "InvalidClassModuleException" exception when supplying a class annotated with `@Controller()` decorator', () => {
sinon.stub(container, 'addModule').returns({} as any);

expect(scanner.insertModule(TestController, [])).to.be.rejectedWith(
InvalidClassModuleException,
);
});
it('should throw "InvalidClassModuleException" exception when suppling a class annotated with (only) `@Catch()` decorator', () => {
it('should throw "InvalidClassModuleException" exception when supplying a class annotated with (only) `@Catch()` decorator', () => {
sinon.stub(container, 'addModule').returns({} as any);

expect(
Expand Down
4 changes: 2 additions & 2 deletions packages/microservices/external/kafka.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ export type ConsumerRebalancingEvent = InstrumentationEvent<{
groupId: string;
memberId: string;
}>;
export type ConsumerReceivedUnsubcribedTopicsEvent = InstrumentationEvent<{
export type ConsumerReceivedUnsubscribedTopicsEvent = InstrumentationEvent<{
groupId: string;
generationId: number;
memberId: string;
Expand Down Expand Up @@ -1106,7 +1106,7 @@ export type Consumer = {
): RemoveInstrumentationEventListener<typeof eventName>;
on(
eventName: ConsumerEvents['RECEIVED_UNSUBSCRIBED_TOPICS'],
listener: (event: ConsumerReceivedUnsubcribedTopicsEvent) => void,
listener: (event: ConsumerReceivedUnsubscribedTopicsEvent) => void,
): RemoveInstrumentationEventListener<typeof eventName>;
on(
eventName: ConsumerEvents['REQUEST'],
Expand Down
4 changes: 2 additions & 2 deletions packages/microservices/test/client/client-grpc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,13 @@ describe('ClientGrpcProxy', () => {

const stream$ = client.createUnaryServiceMethod(obj, methodName)();

const subsciption = stream$.subscribe({
const subscription = stream$.subscribe({
next: dataSpy,
error: errorSpy,
complete: completeSpy,
});

subsciption.unsubscribe();
subscription.unsubscribe();
handler(null, 'a');

expect(dataSpy.called).to.be.false;
Expand Down
Loading

0 comments on commit fda5fff

Please sign in to comment.