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

Latest commit

 

History

History
120 lines (75 loc) · 3.01 KB

CHANGELOG.md

File metadata and controls

120 lines (75 loc) · 3.01 KB

Changelog

All notable changes to the Hocus Pocus extension will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.7.0 - 2020-11-05

Added

  • Create Switch Cases now handles inferred union types. So now it can infer things like:
type Actions =
  | { type: "listTokens"; payload: { page: number } }
  | { type: "renameToken"; payload: {} & { id: string } }
  | { type: "removeToken"; payload: {} }
  | { type: "createToken" };

function doSomething(action: Actions) {
  // It will autocomplete with all types!
  switch (action.type) {
  }
}

1.6.0 - 2020-10-08

Added

  • (New Feature) Create Switch Cases

Changed

  • We moved the 🔮 emoji at the end of the Quick Fix title for accessibility. Now you can type the first character of the title to select it with your keyboard!

1.5.0 - 2020-05-29

Changed

  • "Create Function" will use the generic type instead of the type literal. The generic is more useful and probably what you'd expect.
doSomething("hello");

// Used to create 😐
function doSomething(param1: "hello") {}

// Now creates 😃
function doSomething(param1: string) {}

Fixed

  • "Create Variable" created a mess when used in some patterns (if, while, for statements). It now works as expected.
  • "Create Function" now infers enum types correctly in TS.

1.4.0 - 2020-05-21

Added

  • "Create Function" now adds the inferred types when used from TypeScript files

1.3.0 - 2020-05-16

Added

  • (New Feature) Create Class

1.2.1 - 2020-04-04

Fixed

  • "Create Variable" now works well from variable declarations & JSX syntax

1.2.0 - 2020-04-04 - I handle async functions 🔮

Added

  • "Create Function" now adds async keyword if used with await, thanks to @automatensalat

So this code:

const result = await doSomething();

Will generate:

async function doSomething() {}

1.1.0 - 2019-12-22 - I can create variables 🔮

Added

  • (New Feature) Create Variable

1.0.0 - 2019-12-16 - I can create functions 🔮

Added

  • (New Feature) Create Function