Skip to content

Commit 5cc0ee7

Browse files
updating timing
1 parent 74645f3 commit 5cc0ee7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/compiler/src/core/checker.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5959,18 +5959,22 @@ export function createChecker(program: Program, resolver: NameResolver): Checker
59595959
stats.finishedTypes++;
59605960

59615961
if (!options.skipDecorators) {
5962+
let postSelfValidators: ValidatorFn[] = [];
59625963
if ("decorators" in typeDef) {
5963-
applyDecoratorsToType(typeDef);
5964+
postSelfValidators = applyDecoratorsToType(typeDef);
59645965
}
59655966
typeDef.isFinished = true;
59665967
Object.setPrototypeOf(typeDef, typePrototype);
5968+
runPostValidators(postSelfValidators);
59675969
}
59685970

59695971
markAsChecked(typeDef);
59705972
return typeDef;
59715973
}
59725974

5973-
function applyDecoratorsToType(typeDef: Type & { decorators: DecoratorApplication[] }) {
5975+
function applyDecoratorsToType(
5976+
typeDef: Type & { decorators: DecoratorApplication[] },
5977+
): ValidatorFn[] {
59745978
const postSelfValidators: ValidatorFn[] = [];
59755979
for (const decApp of typeDef.decorators) {
59765980
const validators = applyDecoratorToType(program, decApp, typeDef);
@@ -5981,7 +5985,7 @@ export function createChecker(program: Program, resolver: NameResolver): Checker
59815985
postCheckValidators.push(validators.onGraphFinish);
59825986
}
59835987
}
5984-
runPostValidators(postSelfValidators);
5988+
return postSelfValidators;
59855989
}
59865990

59875991
/** Run a list of post validator */

0 commit comments

Comments
 (0)