Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript show arguments on function call vscode

type AlertType = 'success' | 'danger' | 'warning'

function setAlert (type: AlertType) {};

setAlert('success') // so it will look like setAlert(type: 'success')
setAlert('danger') // and setAlert(type: 'danger')

// 1. in vscode go to settings. usually cmd + <
// 2. type "parameter name"
// 3. search line with "TypeScript › Inlay Hints › Parameter Names: Enabled"
// 4. switch checkbox to "all" || "literals"
Source by # #
 
PREVIOUS NEXT
Tagged: #typescript #show #arguments #function #call #vscode
ADD COMMENT
Topic
Name
4+9 =