Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Refactor NNI Manager UT (Stage 1) - setup toolchain #4109

Merged
merged 3 commits into from
Aug 27, 2021

Conversation

liuzhe-lz
Copy link
Contributor

No description provided.

@@ -301,11 +299,11 @@ class NNIRestHandler {
private getTrialFile(router: Router): void {
router.get('/trial-file/:id/:filename', async(req: Request, res: Response) => {
let encoding: string | null = null;
const filename = req.params.filename;
const filename = req.params['filename'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the different between .xxx and ['xxx']

Copy link
Contributor

@cruiseliu cruiseliu Aug 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No difference other than style.
This is required by tsc's strict option noPropertyAccessFromIndexSignature. Because the type of req.params is something like [key: string]: string, instead of filename: string.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it.

@acured acured merged commit 5fc73ba into microsoft:master Aug 27, 2021
@liuzhe-lz liuzhe-lz deleted the ts-config branch October 12, 2021 04:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants