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
- 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
- (New Feature) Create Switch Cases
- 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
- "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) {}
- "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
- "Create Function" now adds the inferred types when used from TypeScript files
1.3.0 - 2020-05-16
- (New Feature) Create Class
1.2.1 - 2020-04-04
- "Create Variable" now works well from variable declarations & JSX syntax
1.2.0 - 2020-04-04 - I handle async functions 🔮
- "Create Function" now adds
async
keyword if used withawait
, 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 🔮
- (New Feature) Create Variable
1.0.0 - 2019-12-16 - I can create functions 🔮
- (New Feature) Create Function