Midwest Dev Chat

MidwestDevChat.com

  • The newest 15 messages in the super-cool #typescript channel.

  • 02/19 11:11:00 Mose: Anyone know if there’s a way to tell typescript to not care about underscore notation in an arrow function? For example, I like the clarity of:
    setTimeout( _ => {…}, 100)
    If you have strict enabled, TS will say that the underscore has an implicit any.
  • 02/19 11:12:08 Mose: Easy to write
    setTimeout( (): void => {…}, 100)
    But I just think the underscore is cleaner/easier to understand that we’re specifically not interested in getting anything back.
  • 02/19 11:12:31 Cammy: hrm. somehow I have typing disabled on lambda functions so I have never run into this
  • 02/19 11:12:44 Mose: Oo interesting
  • 02/19 11:13:04 Mose: I’m sure there’s a way I just haven’t dug through the configs enough
  • 02/19 11:13:14 Cammy: ^^ that is the way smile
  • 02/19 11:13:30 Cammy: (digging through configs I mean laughing )
  • 02/19 11:13:54 Mose: Accurate
  • 02/19 11:14:08 Mose: I’ll let you know if I figure it out!
  • 02/19 11:15:14 Cammy: https://github.com/Microsoft/TypeScript/wiki/Wh... may be a help?
  • 02/19 11:15:32 Cammy: looks like params declared with `_` are exempt as of 2.x?
  • 02/19 11:15:54 Mose: huh I wonder if it’s vscode then
  • 02/19 11:15:56 Mose: I’m on ts 2.7
  • 02/19 11:22:54 Cammy: strange. do you have a tslint set up that might be giving you a warning (as opposed to the typescript compiler?)
  • *Usernames have been changed to protect the innocent.
We're currently 1024 members strong. Join us!
Request Invite

Check out all the cool channels!

Join the conversation!