mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 04:17:34 -06:00
Address PR: use getDefaultLibLocation to get directory
This commit is contained in:
parent
ade92873bc
commit
b9cd882ae7
@ -638,7 +638,7 @@ namespace ts {
|
||||
return {
|
||||
getSourceFile,
|
||||
getDefaultLibLocation,
|
||||
getDefaultLibFileName: options => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), getDefaultLibFileName(options)),
|
||||
getDefaultLibFileName: options => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options)),
|
||||
writeFile,
|
||||
getCurrentDirectory: memoize(() => sys.getCurrentDirectory()),
|
||||
useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames,
|
||||
|
||||
@ -712,8 +712,21 @@ namespace ts {
|
||||
output += usage + makePadding(marginLength - usage.length + 2) + description + sys.newLine;
|
||||
|
||||
if (kindsList) {
|
||||
for (const kind of kindsList) {
|
||||
output += makePadding(marginLength + 4) + kind + sys.newLine;
|
||||
const maxElementsInLine = 6;
|
||||
for (let idx = 0; idx < kindsList.length; idx++) {
|
||||
// We have to manually cut the line because the list is too long and it will be very hard to read with auto-wrapping
|
||||
// It will print in the following format:
|
||||
// 'es5' 'es6' 'es2015'
|
||||
// 'es7' 'es2016' 'dom'
|
||||
// ....
|
||||
const positionInLine = idx % maxElementsInLine;
|
||||
if (positionInLine === 0) {
|
||||
output += makePadding(marginLength + 4);
|
||||
}
|
||||
output += kindsList[idx] + " ";
|
||||
if (positionInLine === maxElementsInLine - 1) {
|
||||
output += sys.newLine;
|
||||
}
|
||||
}
|
||||
output += sys.newLine;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user