Starting with pure JavaScript is the best way to get a solid knowledge of web game development. After that, you can pick any framework you like and use it for your projects. Frameworks are just tools built with the JavaScript language; so even if you plan on working with them, it's good to learn about the language itself first to know what exactly is going on under the hood. Frameworks speed up development time and help take care of boring parts of the game, but if something is not working as expected, you can always try to debug that or just write your own solutions in pure JavaScript.
Or learn Pixi.js instead of Phaser. I think it is better to learn pure JS and basics of Canvas API first. It is good to study how to write shaders in pure WebGL too (GLSL). One of the best book for beginners: https://sites.google.com/site/webglbook/ You can write shaders for Pixi.js and Phaser later. It can help to solve a lot of problems. But now just practice with very simple games like: Pong, Snake, Breakout and so on.
can I write my code in vanilla and then mix in pixijs for animating a sprite walk cycle or must I write the whole game in pixijs?
Yes! You can mix and match js however you want! Some frameworks make it more difficult, but it depends on what you're using them for and in what combination. You're always free to add something extra though. (and often you have a lot of control in the upper parts of your code anyways)
It is great that Pixi.js has native supporting for TS. My opinion that TS is better for games and especially for large projects. But Pixi.js has a very small community: https://www.html5gamedevs.com/forum/15-pixijs/ Only one person is active in Pixi.js community. It is ivan.popelyshev. He is one of the main developer of Pixi.js. There is only one old book about Pixi.js and Rex Van Der Spuy is author of this book: https://www.amazon.com/Learn-Pixi-js-Create-Interactive-Graphics/dp/1484210956 This book contains only 234 pages. It is a very short book.
If you need a framework for 2D games with big community I recommend Phaser. Because it has a very large community. It supports TypeScript and JavaScript. There are more books about Phaser (and video courses). But I like to write my simple games for practice in pure WebGL/TypeScript and OpenGLES/QtC++ (for native Desktop, Android/iOS). It allows me to use same things for 2D/3D and for Desktop/Mobile/Web.
If a topic for programmers do not have any code it is mean that it is a bad topic. What should we have to make a simple game? We need:
text
geometry primitives
How can I build native applications for Desktop and Mobile? I can use Qt C++. Code will be the same for Canvas API (JavaScript) and QPainter (Qt C++). Qt allows to build for Desktop and Mobile very quickly. Qt is very fast because it is 100% C++. But JS allows to run apps by one click. We can build three versions of games: Web, Desktop and Mobile. Just compare how similar JS (Canvas API) and Qt C++ (QPainter):