-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce unused exports #164937
Comments
I have added owners of code areas I used to own and I updated the table. |
I often use |
@hediet yeah please feel free to keep those exported 🙂 |
Also types that are used implicitly (like by passing an options object literal to another method) but are not actually currently referenced by name. I have a couple of those. But this was some good cleanup, thanks for the prompt! |
Checked and updated those assigned to me. |
@rebornix and I were wondering if there is any dead code in the VS Code codebase, and one idea was to detect unused exports across the codebase, since unused variables are flagged by the compiler but unused exports are not.
I ran
ts-unused-exports
on our sources and generated the following list. I've already done a pass to remove some false positives but apologies if several remain.NB: The primary purpose of this issue is to identify unused functions and classes which aren't being picked up by the compiler because they're exported and which can be safely deleted from our sources to reduce our bundle size. A secondary benefit is to remove unused types and interfaces, e.g. anything which was exported at one point and then ceased to be referenced from other files (which more impacts compile time for dev workflows and pipeline runs, and maybe TS server analysis time, but has no direct impact on bundle size since types are erased).
If you export a type or interface that is not currently actively imported, but is used in the public API of a class that you expose, then it's quite likely that you want to keep that type/interface exported and need not un-export it as part of this issue.
Please feel free to remove your assignment if you find that this isn't valuable.
editorMarkerNavigationWarningHeader
extensionRatingIconColor
extensionPreReleaseIconColor
InputEvent
IObservableLogger
LoggingObserver
LoggingObservableValue
TimeOffset
Scheduler
ScheduledTask
ScheduledTaskSource
TimeTravelScheduler
AsyncSchedulerProcessor
originalGlobalValues
throwIfDisposablesAreLeakedAsync
PartialModelCursorState
PartialViewCursorState
OutputPosition
joinSequenceDiffs
shiftSequenceDiffs
Extensions
BracketKindBase
lengthCompare
lengthOfStringObj
lengthHash
IDenseKeyProvider
ILineChange
ICharChange
IUnicodeCharacterSearcherTarget
ActiveGhostTextController
DelegatingModel
InlineCompletionsSession
TrackedInlineCompletion
SuggestWidgetState
SuggestItemInfo
IBannerItem
TextEdit
Sound
MergeEditorArgs
IMergeEditorInputModelFactory
elementAtOrUndefined
MergeMarkersController
IMergeDiffComputerResult
LineEdits
MergeEditorModelState
getOtherInputNumber
AbstractModifiedBaseRangeState
ModifiedBaseRangeStateBase
ModifiedBaseRangeStateInput1
ModifiedBaseRangeStateInput2
ModifiedBaseRangeStateBoth
ModifiedBaseRangeStateUnrecognized
ProjectedDiffComputer
ITextModelDiffsState
IGutterItemProvider
LineAlignment
MergeEditorViewZones
MergeEditorViewZone
ModifiedBaseRangeGutterItemModel
MergeConflictGutterItemView
CenteredViewState
ICenteredViewStyles
WorkbenchListMultiSelection
SIGN_SERVICE_ID
ICompositeBarOptions
MAX_VALUE_RENDER_LENGTH_IN_VIEWLET
twistiePixels
IRenderValueOptions
IVariableTemplateData
IPrivateBreakpointWidgetService
VariablesDataSource
WatchExpressionsRenderer
DEBUG_SERVICE_ID
IEnvConfig
BaseSaveAllAction
IFileTemplateData
MAX_OUTPUT_LENGTH
CONTEXT_IN_OUTPUT
create
The text was updated successfully, but these errors were encountered: