Inviting anyone to join my stream? What could go wrong?! ๐Ÿ”— **Source:** [Inviting anyone to join my stream? What could go wrong?!](https://www.youtube.com/watch?v=S7iz-lSkoh8) > [!note]+ Document Notes > tags: [twitch-stream, typescript, wordpress, community, viewer-callin] > author: Ryan Welcher > source: Twitch > reference: https://www.youtube.com/watch?v=S7iz-lSkoh8 > date created: 2025-01-15 13:45 > > # ๐Ÿท๏ธ Title: Inviting anyone to join my stream? What could go wrong?! > <!-- deep-read:sections start --> ## ๐Ÿงฐ Action Inbox - [H1] Experiment with Twitch viewer call-ins โ€” first-time feature test #streaming - [H2] Work on TypeScript block development โ€” learning process documentation #typescript - [H3] Review WP Rig plugin feedback โ€” promised community response #wordpress ## ๐Ÿงญ Table of Contents - [๐Ÿ“ Summary](#-summary) - [๐Ÿ“– Main Content](#-main-content) - [๐Ÿ—’๏ธ Notes](#๏ธ-notes) - [๐Ÿ“š References](#-references) - [๐Ÿ—ฃ๏ธ Paraphrase](#๏ธ-paraphrase) - [๐Ÿ“ฐ Newsletter](#-newsletter) - [โœ… Action Items](#-action-items) - [๐Ÿงช Hypotheses](#-hypotheses) - [๐Ÿ“Š Methodology](#-methodology) - [โ“ Questions](#-questions) - [๐Ÿ”ฎ Future Research](#-future-research) - [๐Ÿ’ก Implications](#-implications) - [๐Ÿง  Learning Styles Assessment](#-learning-styles-assessment) - [๐Ÿ“Š Accessibility Assessment](#-accessibility-assessment) - [๐ŸŒ DEIB Assessment](#-deib-assessment) - [โœ… Logical Validity](#-logical-validity) - [๐Ÿ›ก๏ธ DARVO Analysis](#-darvo-analysis) - [๐ŸŽฏ Conclusion](#-conclusion) ### ๐Ÿ”— References - [WP Rig Plugin](https://github.com/wprig/wprig) - [Totally TypeScript Course](https://totaltypescript.com) ## ๐Ÿ“ Summary - Ryan Welcher experiments with Twitch viewer call-ins on his first 2026 stream - Multiple community members join to discuss WordPress development and TypeScript integration - Paul Baron shares a plugin proposal for managing code snippets with security considerations - Live coding session demonstrates TypeScript implementation challenges in WordPress blocks - Community discussion covers caching solutions, plugin development, and WordPress core TypeScript adoption ## ๐Ÿ“– Main Content This stream represents an experimental format where viewers can directly join the broadcast through Twitch's call-in feature. The session covers multiple WordPress development topics while demonstrating the technical and social dynamics of live collaborative streaming. The main technical focus involves implementing TypeScript in WordPress block development, addressing the lack of proper types in core packages. Ryan works through creating custom type declarations and demonstrates common challenges developers face when migrating to TypeScript. Paul Baron presents a plugin concept for managing code snippets with dynamic settings pages, raising important security considerations around arbitrary code execution. The discussion highlights the balance between functionality and security in WordPress plugin development. ## ๐Ÿ—’๏ธ Notes #### โฑ๏ธ [00:00](https://youtu.be/S7iz-lSkoh8?t=0) โ€” [H1] Stream Setup and Viewer Call-ins Introduction - Key idea: Testing Twitch viewer call-in feature for interactive streaming - Evidence: "There's this thing in Twitch called viewer calling. People can actually jump up." #### โฑ๏ธ [02:30](https://youtu.be/S7iz-lSkoh8?t=150) โ€” [H2] 2026 Goals and TypeScript Focus - Key idea: Dedicating 2026 to learning TypeScript for WordPress development - Evidence: "2026 for me is going to be the year of Typescript. I'm going to learn it. I'm going to work with it in every project." #### โฑ๏ธ [05:45](https://youtu.be/S7iz-lSkoh8?t=345) โ€” [H2] Community Poll Results Discussion - Key idea: Audience split between JavaScript and TypeScript content preferences - Evidence: "It's still 50/50. I should have taken this. Why not both out?" #### โฑ๏ธ [08:20](https://youtu.be/S7iz-lSkoh8?t=500) โ€” [H2] React and WordPress Block Development Resources - Key idea: Recommending learning path for React in WordPress context - Evidence: "I would learn a little bit of React for sure... go to somewhere like the block editor handbook" #### โฑ๏ธ [12:15](https://youtu.be/S7iz-lSkoh8?t=735) โ€” [H2] WP Rig Plugin Discussion - Key idea: Community member seeking feedback on WP Rig's block building system - Evidence: "WP rig now has a block building system in it based on create block" #### โฑ๏ธ [15:30](https://youtu.be/S7iz-lSkoh8?t=930) โ€” [H1] Paul Baron Joins Stream - Key idea: First successful viewer call-in with audio/video setup - Evidence: "Paul, are are you there, sir? Okay, I can see you, Paul, but I can't hear you." #### โฑ๏ธ [18:45](https://youtu.be/S7iz-lSkoh8?t=1125) โ€” [H1] Code Snippet Management Plugin Proposal - Key idea: Paul presents plugin for managing code snippets with security considerations - Evidence: "Managing insertion of code snippets... we split it up and you know we can actually control what is" #### โฑ๏ธ [25:10](https://youtu.be/S7iz-lSkoh8?t=1510) โ€” [H2] Security Concerns in Snippet Management - Key idea: Discussing risks of arbitrary code execution in WordPress plugins - Evidence: "What would keep somebody from putting a two some script tags with some malicious code in there?" #### โฑ๏ธ [28:30](https://youtu.be/S7iz-lSkoh8?t=1710) โ€” [H2] Troy Joins for Caching Discussion - Key idea: Second viewer joins to discuss server optimization and caching - Evidence: "We were just looking at implementing uh Surge on our servers just to get some some better full page caching" #### โฑ๏ธ [32:45](https://youtu.be/S7iz-lSkoh8?t=1965) โ€” [H2] Nonce Caching Problems Solution - Key idea: Addressing nonce expiration in cached forms using JavaScript - Evidence: "Load the page and then run JavaScript immediately to update portions of the page that need to be updated" #### โฑ๏ธ [38:20](https://youtu.be/S7iz-lSkoh8?t=2300) โ€” [H1] TypeScript Implementation Challenges - Key idea: Demonstrating custom type declarations for WordPress blocks - Evidence: "In WordPress for example in our blocks package there's no proper types" #### โฑ๏ธ [42:15](https://youtu.be/S7iz-lSkoh8?t=2535) โ€” [H2] Totally TypeScript Course Review - Key idea: Learning TypeScript through structured online course - Evidence: "I'm taking this course... Totally TypeScript by Matt PCO" #### โฑ๏ธ [45:50](https://youtu.be/S7iz-lSkoh8?t=2750) โ€” [H1] WordPress Core TypeScript Integration Discussion - Key idea: Plans for adding TypeScript support to WordPress core packages - Evidence: "I think we need it. I'm actually working on helping to get that done" #### โฑ๏ธ [52:30](https://youtu.be/S7iz-lSkoh8?t=3150) โ€” [H2] Community Perspectives on TypeScript Adoption - Key idea: Discussing community division on TypeScript in WordPress - Evidence: "There are Typescript enthusiasts... then there's this other side from Twitter that's oh no... they're following butterflies" ## ๐Ÿ“š References - [WP Rig GitHub Repository](https://github.com/wprig/wprig) - [Block Editor Handbook](https://developer.wordpress.org/block-editor/) - [Totally TypeScript Course](https://totaltypescript.com) - [WordPress Core TypeScript PR](https://github.com/WordPress/gutenberg/pull/[MISSING]) ## ๐Ÿ—ฃ๏ธ Paraphrase - Ryan experiments with interactive streaming by allowing viewers to join via Twitch call-ins, creating a collaborative development environment - The technical discussion centers on implementing TypeScript in WordPress block development, addressing missing type definitions in core packages - Community members present various plugin concepts and development challenges, highlighting the collaborative nature of WordPress development ## ๐Ÿ“ฐ Newsletter **Interactive WordPress Development: Exploring TypeScript and Community Collaboration** This week's stream showcased an experimental approach to developer education through interactive broadcasting. The combination of live coding, community participation, and real-time problem-solving demonstrates new possibilities for WordPress developer engagement. Key highlights include practical TypeScript implementation strategies for WordPress blocks and community-driven plugin development discussions. The interactive format allowed for immediate feedback and collaborative problem-solving. **Practical Applications:** - TypeScript integration strategies for WordPress development - Security considerations in plugin development - Caching solutions for dynamic content Resources: [Learn WordPress](https://learn.wordpress.org/), [Block Editor Handbook](https://developer.wordpress.org/block-editor/), [TypeScript Handbook](https://www.typescriptlang.org/docs/) ## โœ… Action Items #### DevRel - Developer advocacy: Document TypeScript adoption patterns for WordPress community - Education: Create TypeScript learning path for WordPress developers - Developer experience: Address missing types in WordPress core packages - Community management: Facilitate interactive streaming for developer engagement #### WordPress - Core: Progress TypeScript integration in block packages - Core Performance: Address caching challenges with dynamic content - Community: Support interactive formats for developer education - Documentation: Create TypeScript migration guides for plugin developers - Plugins: Establish security guidelines for code snippet management plugins #### Community - Contributors: Engage in TypeScript adoption discussions - Ecosystem: Balance innovation with backward compatibility concerns ## ๐Ÿงช Hypotheses - Interactive streaming formats increase community engagement and learning outcomes - TypeScript adoption in WordPress core will improve developer experience without fragmenting the community - Security-conscious plugin development requires balancing functionality with safety measures - Real-time collaborative problem-solving accelerates learning for participants and viewers ### ๐Ÿ“Š Methodology - A/B testing of traditional vs interactive streaming formats for engagement metrics - Survey WordPress developers on TypeScript adoption barriers and benefits - Security analysis of code snippet management approaches in WordPress plugins ### โ“ Questions - How can WordPress balance TypeScript adoption with accessibility for new developers? - What security frameworks should guide plugin development for code management features? - How do interactive streaming formats compare to traditional documentation for developer education? ### ๐Ÿ”ฎ Future Research - Long-term impact of TypeScript adoption on WordPress plugin ecosystem - Effectiveness of interactive streaming for technical education - Community response patterns to major technological shifts in open source projects ### ๐Ÿ’ก Implications - Practice: Developers need strategies for gradual TypeScript adoption in existing projects - Policy: WordPress core needs clear guidelines for TypeScript integration timeline - Security: Code snippet management plugins require rigorous security review processes - Education: Interactive formats may supplement traditional documentation effectively - Community: Technology adoption discussions benefit from inclusive dialogue approaches ### ๐Ÿง  Learning Styles Assessment Reading level estimate: 12th grade (technical content with accessible explanations) #### ๐Ÿ‘€ Visual learners - Present: Live coding demonstrations, plugin interface mockups - Improve: Architecture diagrams for TypeScript integration, visual security flow charts #### ๐Ÿ”Š Aural learners - Present: Live discussion, verbal explanations of concepts - Improve: Structured audio segments explaining key concepts #### ๐Ÿ—ฃ๏ธ Verbal learners - Present: Interactive Q&A, definition of technical terms - Improve: Glossary of TypeScript terms for WordPress context #### ๐Ÿงฉ Kinesthetic learners - Present: Live coding exercises, hands-on problem solving - Improve: Step-by-step TypeScript migration guides, interactive tutorials #### ๐Ÿง  Logical learners - Present: Problem-solving sequences, technical decision trees - Improve: Flowcharts for TypeScript adoption process, security decision matrices #### ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ Social learners - Present: Community discussion, viewer call-ins, collaborative problem solving - Improve: Structured peer review processes, group learning challenges #### ๐Ÿง˜โ€โ™€๏ธ Solitary learners - Present: Individual coding challenges, self-paced course references - Improve: Personal reflection prompts, self-assessment tools #### ๐ŸŒฟ Naturalistic learners - Present: Evolution of technology adoption patterns - Improve: Ecosystem thinking about WordPress development environment ### ๐Ÿ“Š Accessibility Assessment #### Screen reader semantics - Present: Live verbal descriptions of visual code elements - Improve: Alt text for code snippets, descriptive variable naming #### Keyboard navigation - Present: Live coding demonstrates keyboard-focused development - Improve: Keyboard shortcut documentation, navigation guides #### Contrast and readability - Present: High contrast code editor themes - Improve: Consistent color coding standards, readability guidelines #### Media and captions - Present: Live audio discussion with multiple speakers - Improve: Auto-generated captions, transcript availability ### ๐ŸŒ DEIB Assessment #### Cultural breadth - Present: Global community participation through streaming platform - Improve: Multi-timezone considerations, international case studies #### Inclusive language - Present: Technical discussions using accessible terminology - Improve: Avoiding insider jargon, defining technical terms consistently #### Neurodiversity support - Present: Multiple input methods (audio, visual, text chat) - Improve: Structured agendas, clear topic transitions #### Representation - Present: Multiple community members contributing expertise - Improve: Diverse technical perspectives, inclusive participation guidelines ### โœ… Logical Validity #### Strong reasoning - Deductive strength: TypeScript benefits identified through specific WordPress development challenges - Inductive strength: Community patterns extrapolated from individual developer experiences - Causal reasoning: Security concerns linked to specific plugin functionality risks - Analogical strength: Comparing WordPress TypeScript adoption to other framework migrations #### Fallacies - Appeal to novelty: Assumption that newer technology (TypeScript) is inherently better - False dichotomy: Framing TypeScript adoption as all-or-nothing decision #### Tone of voice - Overall tone: Collaborative and experimental, encouraging community participation while acknowledging technical challenges ### ๐Ÿ›ก๏ธ DARVO Analysis - Deny: No denial patterns observed - Attack: No attack patterns observed - Reverse victim/offender: No reversal patterns observed - Emotional cues and rhetoric: Positive, collaborative tone focused on learning and community building ## ๐ŸŽฏ Conclusion This experimental stream format demonstrates the potential for interactive developer education within the WordPress community. The combination of live coding, community participation, and real-time problem-solving creates engaging learning opportunities while addressing practical development challenges. The TypeScript discussion highlights the ongoing evolution of WordPress development practices, balancing innovation with accessibility. The security considerations raised around plugin development underscore the importance of careful design in extending WordPress functionality. Moving forward, interactive formats like this could supplement traditional documentation and conferences, providing more accessible ways for community members to participate in technical discussions and collaborative problem-solving. ## ๐Ÿงฑ Refactor Appendix ### ๐Ÿ“š Literature Split Pad Purpose: Stage CEE units that become Literature notes. Split level: H3 ### [H1] Interactive streaming improves developer community engagement > [!quote] [Inviting anyone to join my stream? What could go wrong?!](https://www.youtube.com/watch?v=S7iz-lSkoh8) by [[Ryan Welcher]] via [[Twitch]]. Published 2026-01-01. Accessed 2025-01-15. > "This is the first time I set this up, so this is fun. But I want to make sure that you can actually hear what Paul's saying" Demonstrates experimental approach to developer education through real-time collaboration. [view highlight](https://youtu.be/S7iz-lSkoh8?t=930#H1) #xref #streaming ID:rw_001 ### [H2] TypeScript adoption requires gradual integration strategy > [!quote] [Inviting anyone to join my stream? What could go wrong?!](https://www.youtube.com/watch?v=S7iz-lSkoh8) > "I think we need to get the types in in there first, get in and get that passing and then starting to add these types to the codebase" Shows practical approach to large-scale technical migrations in open source projects. [view highlight](https://youtu.be/S7iz-lSkoh8?t=2750#H2) #xref #typescript ID:rw_002 --- ### ๐Ÿ”– Atomic Split Pad (Zettel Candidates) Purpose: Promote reusable claims into Atomic notes. Split level: H4 #### [Z1] Security concerns scale with plugin --- ## Full Transcript [05:06] Hi everyone. How's it going today?<br>[05:12] Welcome to the first game. I don't know<br>[05:15] watching right now. Cool. If you were<br>[05:26] all right, if you're here, say hi. Um,<br>[05:29] I'm trying something new. Trying<br>[05:31] something new today, which I don't know<br>[05:34] if this is going to work out. There's<br>[05:35] this thing in Twitch called viewer<br>[05:36] calling. People can actually jump up.<br>[05:40] You know what? It's really hard to hear<br>[05:41] me when my microphone's way over there,<br>[05:43] I'd imagine. I don't know what I'm<br>[05:44] talking about. Okay.<br>[05:47] Do I have audio? Let's check. Hello.<br>[05:49] Check one, two. Check one, two. There we<br>[05:51] go. All right. So, anyways, as I was<br>[05:54] saying before, um, today is first stream<br>[05:58] of 2026. Pretty excited to be back. Had<br>[06:00] a great holiday. Um, and I uh I'm doing<br>[06:04] something new. I might do this every<br>[06:05] week. We're going to see how it goes<br>[06:07] today.<br>[06:08] Very Is the audio still very soft on<br>[06:11] your side? I I uh realized my my<br>[06:14] microphone is really really really far<br>[06:16] away from my face there. So, it's<br>[06:18] probably what it was. But audio should<br>[06:21] be pretty crispy now. Um, let me know if<br>[06:25] There we go. Kev XP,<br>[06:27] how's it going?<br>[06:30] Oh, you know what? I I didn't do<br>[06:34] didn't connect my Firebot. There we go.<br>[06:37] That's why I can't see anybody. Okay, so<br>[06:39] Kevin, you're not going to get the shout<br>[06:41] out because my Firebot wasn't connected.<br>[06:44] Yeah, thanks. Thanks, Techies Review.<br>[06:46] Uh, appreciate that. Um, I had my<br>[06:48] microphone in the wrong place. Oh,<br>[06:50] there's my dog barking. You can hear<br>[06:52] him. There he is.<br>[06:54] So, um, anyways, there's this thing in<br>[06:58] Twitch called viewer call-ins where if<br>[07:00] you have a tw a Twitch account, I think<br>[07:01] you have to be phone enabled, uh, you<br>[07:04] can call in and we can chat. So, if<br>[07:07] you're<br>[07:08] ruined your night Oh, it is night. Well,<br>[07:10] Kevin, why don't you just jump on the<br>[07:12] old Twitch account and come on in to<br>[07:14] your<br>[07:20] >> There it is. I turned the thing on and<br>[07:22] then it realized that you chatted. So,<br>[07:23] there you go. There's a shout out for<br>[07:24] Kev XP. Um,<br>[07:30] nice. You can sleep tonight. Oh, you<br>[07:32] can't sleep tonight until you do a<br>[07:33] viewer call in. Kevin, go get on your<br>[07:35] Twitch channel. I know you got one and a<br>[07:38] microphone and do a call in and you can<br>[07:41] come on the stream with me. You can<br>[07:43] talk. Call in. Do Yes, we'll debate<br>[07:46] whatever you want to debate. Typescript.<br>[07:48] You can tell me what I'm doing wrong<br>[07:49] with Typescript. Uh 2026 for me for me<br>[07:53] is going to be the year of Typescript.<br>[07:54] I'm going to learn it. I'm going to work<br>[07:56] with it in every project. Um and it's<br>[08:00] going to be fun.<br>[08:02] That's my plan.<br>[08:05] So yeah,<br>[08:08] tell me C. Actually, Kevin, if you're<br>[08:09] interested, jump on. What's the vote<br>[08:11] count? The vote count. Oh, did you were<br>[08:13] Were you the one that voted or two that<br>[08:16] voted? Let's see.<br>[08:19] Let's take a look here. Uh where are my<br>[08:21] posts? The vote count right now is<br>[08:24] sitting at two votes. One for<br>[08:26] JavaScript. If you haven't I I would<br>[08:29] love um<br>[08:32] some uh you were first. Nice. Well,<br>[08:36] Kevin, you are first in my heart as<br>[08:38] well. So, that is the the the poll to my<br>[08:42] YouTube account that I just I'm just<br>[08:44] trying to get an idea of what people<br>[08:45] want to see on my um channel here. So if<br>[08:48] you're interested, please hit that link<br>[08:51] and go tell me what you want to see. If<br>[08:53] there's something that's not on like<br>[08:54] it's very generic. It's like do you want<br>[08:55] JavaScript<br>[08:58] now? Who? Yeah. Well, I know I know<br>[09:00] which which vote yours was, Kev.<br>[09:03] U JavaScript, TypeScript, PHP focused<br>[09:06] stuff. I was thinking, you know what,<br>[09:07] there's a lot of a lot of knowledge out<br>[09:09] there and WordPress that um um people<br>[09:14] who've maybe been around for a while.<br>[09:17] I'm I'm not the other one. I didn't<br>[09:18] vote. Um<br>[09:21] already know. So like oh tech techies<br>[09:24] review also curious to start learning<br>[09:25] about React and WP just like PHP in the<br>[09:27] good old days. What would be your go-to<br>[09:28] sources? Um this is a good question from<br>[09:33] uh although I can't highlight it. It's<br>[09:35] in um it's in YouTube uh techies review.<br>[09:38] You're more than welcome to just stay<br>[09:40] over there in YouTube but the chat<br>[09:41] mostly happens in in Twitch. So if<br>[09:43] you're interested come on over. But the<br>[09:45] question is, curious to start learning<br>[09:47] React WP, just like PHP in the good old<br>[09:49] days. What would you what would be your<br>[09:51] go-to sources? Well, I would learn a<br>[09:52] little bit of React for sure. If you're<br>[09:55] not familiar with React at all, you<br>[09:58] there's a million courses out there just<br>[10:00] to get up to speed on React. And after<br>[10:02] that, I would probably go to somewhere<br>[10:04] like the block editor handbook and like<br>[10:07] the getting started guide. So this is<br>[10:08] going to teach you the the fundamentals<br>[10:10] of block de uh uh development which is<br>[10:12] kind of where the majority of<br>[10:15] um JavaScript development is happening<br>[10:17] inside of WordPress. Um, so this is a a<br>[10:21] good place to go get started and you<br>[10:23] could just uh you know the other thing<br>[10:25] is you can just hang out here. Just uh<br>[10:26] subscribe to my channel, follow me on<br>[10:29] Twitch and Twitter and wherever and<br>[10:31] we'll talk about stuff because this is<br>[10:32] what we do here is we talk about<br>[10:34] WordPress and uh and React, JavaScript<br>[10:37] and React and stuff like well not so<br>[10:39] much React more like how WordPress react<br>[10:42] and JavaScript all kind of intersect.<br>[10:44] That's sort of the idea behind it. Um,<br>[10:47] Kevin, I still don't see you in my<br>[10:49] callins.<br>[10:53] Anyways, um, yeah. All right. So,<br>[10:59] let's let me refresh this. You six<br>[11:02] votes. Oh my god. Are you kidding me?<br>[11:04] It's still 50/50. I should have taken<br>[11:06] this. Why not both out? I should have<br>[11:08] done that a little bit different. Um, so<br>[11:12] lots of people want to see JavaScript<br>[11:13] type crypt. More people want to see<br>[11:15] both. So that doesn't help me at all.<br>[11:17] It's my own fault.<br>[11:19] All right. Well, speaking of Typescript.<br>[11:22] Ah, thanks Techiey's review. Appreciate<br>[11:24] that very much. Um, I do have combined<br>[11:28] chat. Uh, but some of my chat I I can't<br>[11:32] I I would highlight your your question<br>[11:34] on the stream, but I only get uh chat<br>[11:37] coming in um from um Twitch in there.<br>[11:44] WP rig now has a block building system<br>[11:47] in it based on create block. Curious<br>[11:49] about your thoughts on it.<br>[11:52] H Arbog 17.<br>[11:56] WP rig.<br>[11:58] WP rig. Why does that sound super<br>[12:00] familiar to me? I think I know. What is<br>[12:03] WP rig?<br>[12:07] Let's take a look.<br>[12:12] Wait a minute.<br>[12:22] Is there get up for this?<br>[12:43] Where's the<br>[12:48] repository? Ahation.<br>[12:54] Where's the repository?<br>[12:56] Where's the repository?<br>[13:08] Oh, Rob. Rob. Yes, you asked me about<br>[13:11] this before. I'm sorry. I owe you some<br>[13:14] feedback on this. Um,<br>[13:17] yeah, you reached out to me. I'm sorry.<br>[13:18] There's a uh I need to I need to do a<br>[13:22] dive into this. This is something that<br>[13:24] uh Rob uh Ruiz who's uh spoken with me a<br>[13:27] number of times and asked me about this.<br>[13:29] Um and I owe him feedback on it. Um, I<br>[13:33] think like at a high level, I think<br>[13:34] anything based on create block is the<br>[13:36] right way to go because if you're using<br>[13:37] create block, you're going to be using<br>[13:39] what like the industry is using. So<br>[13:40] that's that's a great first step. That's<br>[13:42] my opinion. That's that's for sure. This<br>[13:44] looks like it's super robust. It's a<br>[13:47] blog article and documentation page.<br>[13:48] Let's take a look. Blog documentation.<br>[13:51] Boom. Documentation. Bootstrap CSSEX<br>[13:55] browsers CSS JavaScript and custom<br>[13:58] blocks including scripts.<br>[14:01] Oh, nice. So, you have Okay, cool.<br>[14:05] cleaning your code with PHP editing.<br>[14:09] This is great. I'm I'm gonna I I'm going<br>[14:11] to read this and I'm going to get back<br>[14:13] to you on this and I do apologize for<br>[14:15] not doing that sooner. So, um I'm just<br>[14:19] uh kind of lazy. Morning Paul. How's it<br>[14:22] going, Paul?<br>[14:24] Um so, like I said, I've got viewer<br>[14:26] callins active. So, if anyone's on<br>[14:27] Twitch and they want to jump on stream<br>[14:29] and just say, "Hey, you don't have to<br>[14:30] have anything to talk about. We we we<br>[14:31] can just, you know, chat. Nothing. It's<br>[14:34] not, you know, nothing formal. It's all<br>[14:36] good. Um, we're uh we're just hanging<br>[14:40] out." But any anyhow, okay, so WP Rigg<br>[14:43] is is a thing that I I I need to check<br>[14:45] out. I'm going to check that out. I I<br>[14:46] promise you. Um, I'm also looking for<br>[14:51] votes on my YouTube channel. If you go<br>[14:52] to posts here, you can tell me what you<br>[14:56] want to see in 2026 or just give me an<br>[14:58] idea of what we're doing there. Um, oh,<br>[15:03] Paul Paul Baron coming in. All right,<br>[15:07] let's see. I've never done this before.<br>[15:08] Going to see what happens. I'm going to<br>[15:11] invite you, Paul.<br>[15:13] Oh, where'd you go?<br>[15:24] Oh, okay. Here we go. All right. Paul,<br>[15:27] do you Paul, do you have a camera? I<br>[15:29] can't hear you or anything. So,<br>[15:34] show on stream. Here we go. Yeah, sure.<br>[15:37] Here we go. Paul,<br>[15:40] there he is.<br>[15:43] Am I streaming outside? No. Paul, are<br>[15:45] are you there, sir?<br>[16:00] Okay, I can see you, Paul, but I can't<br>[16:01] hear you.<br>[16:02] >> One, two, three, four.<br>[16:04] >> Oh, there you are.<br>[16:06] All right,<br>[16:08] cool.<br>[16:10] Um,<br>[16:12] okay, chat, you tell me. Can you hear<br>[16:14] Paul?<br>[16:16] What are we looking at? Oh my Oh, what's<br>[16:17] this? Paul's<br>[16:20] Paul's linking his his Twitch thing. Oh,<br>[16:24] I don't want that. That's okay. All<br>[16:25] right. So, you're on stream there, Paul.<br>[16:27] I don't know if you can see yourself or<br>[16:28] not, but uh say hi to everybody and and<br>[16:31] chat, let me know if you can hear this.<br>[16:32] This is the first time I set this up, so<br>[16:33] this is fun. But I want to make sure<br>[16:34] that you can actually hear what Paul's<br>[16:35] saying, and I can uh I can boost the<br>[16:37] audio if that's needed.<br>[16:41] Paul, can you say something for me?<br>[16:57] Troy Chaplan.<br>[17:02] >> Chap.<br>[17:06] >> It's Troy Chaplan. All right. What do we<br>[17:08] What's the luck? I am not streaming<br>[17:10] outside. I'm just uh I need a haircut<br>[17:12] and so I decided to wear a hat today.<br>[17:15] Managing insertion of code snippets.<br>[17:24] Easy way out. Yeah. Yeah. Yeah. For<br>[17:26] sure.<br>[17:28] Um<br>[17:31] Paul, I don't know. Are you hearing me?<br>[17:33] Okay.<br>[17:40] I don't know what's going on with the<br>[17:41] audio. It popped into another window.<br>[17:56] All right. I don't know if Paul's<br>[17:57] hearing me or not, but if he is, cool.<br>[17:59] So, anyways, what what is this? What is<br>[18:01] this? So, Paul's talking about this is a<br>[18:03] plug-in proposal for insertion of code<br>[18:05] snippets. Interest<br>[18:09] interesting.<br>[18:16] Oh, I can kind of hear you, Paul. You're<br>[18:18] pretty quiet, though. Let me see if I<br>[18:20] can boost your audio here.<br>[18:36] Yeah, we opened up very quiet<br>[18:40] channel. Okay.<br>[18:42] >> And I can see<br>[18:42] >> Hey, Marcus Bernett. How's it going?<br>[18:51] All right. Well, Paul, you're welcome to<br>[18:54] hang out in the stream here with us<br>[18:55] today. We'll see how how it goes. So,<br>[18:57] what is this thing we're looking at?<br>[18:59] This is a plug-in proposal for managing<br>[19:00] snippets. So, I know there's a ton of<br>[19:02] plugins that do this, right?<br>[19:05] Um,<br>[19:09] >> yes, but they all it's a single every<br>[19:11] single one of them is like here's the<br>[19:17] for Oh, but the echo is horrible.<br>[19:23] >> Sorry. So, you're saying that Let me Let<br>[19:26] me just maybe turn my my music off.<br>[19:28] Individual plugins tend to support<br>[19:32] um<br>[19:35] just one snippet.<br>[19:41] >> Oh, I see what you're saying.<br>[19:42] >> So, this idea is the you can take the<br>[19:45] base snippet. Yeah.<br>[19:51] >> And just paste it straight into this uh<br>[19:54] interface. We split it up. we make a<br>[19:58] settings page for those values.<br>[20:01] Um and and then we can control where on<br>[20:06] the page it gets gets and how it gets<br>[20:09] added.<br>[20:14] >> Right? Okay.<br>[20:15] >> So we can then optimize the placement of<br>[20:17] the snippet. we maybe combine snippets<br>[20:20] together<br>[20:22] and<br>[20:24] and if there are options for them. So<br>[20:27] like a lot of the chat bots have like<br>[20:31] colors, icons,<br>[20:34] things like that. We<br>[20:36] >> have an interface where people can<br>[20:37] actually adjust their look and feel.<br>[20:43] >> Right. Okay.<br>[20:45] And<br>[20:47] so so also I'm going to s suggesting we<br>[20:51] support like JSON's JSON JSON file so<br>[20:54] people can put a JSON lump in yet to<br>[20:57] describe<br>[20:59] um and that would generate a settings<br>[21:02] page which people then could fill in. We<br>[21:04] could have a collection of JSON file<br>[21:07] JSON configurations that we preload and<br>[21:11] you just like click a button to<br>[21:14] to end that snippet.<br>[21:18] >> It's just an idea.<br>[21:19] >> Okay.<br>[21:20] >> Yeah.<br>[21:25] Script blocks are all lots of options to<br>[21:26] be managed. So I mean I think I think<br>[21:28] probably like and and<br>[21:32] like Weston Weston's comment here is is<br>[21:35] sort of what was the first sort of<br>[21:37] comment that I had as well. I mean, this<br>[21:38] is just my, you know, initial reaction.<br>[21:40] Like, I have I hold no sway over whether<br>[21:43] things move forward or not, but I would<br>[21:45] be concerned about like if being able to<br>[21:48] insert snippets, how you can control the<br>[21:50] security around that.<br>[21:55] You know what I'm saying?<br>[21:58] because we split it up and you know<br>[22:05] >> we can actually control what is<br>[22:11] >> sorry say that again Paul there was a<br>[22:12] there was a a thing running over top you<br>[22:14] there and<br>[22:17] >> yeah and and is this is more this is<br>[22:21] safer than just allowing someone to drop<br>[22:25] JavaScript into the head<br>[22:28] Right. But how is it? But okay, maybe I<br>[22:31] don't understand the implementation<br>[22:33] possibly. Let me just read this again.<br>[22:35] So create settings allow management of<br>[22:37] code simp control when and how they were<br>[22:39] added to rendered HTML. Add a sending a<br>[22:42] settings page that enables adding<br>[22:44] selecting script of script blocks and<br>[22:46] allows the options to be managed. There<br>[22:48] are lots of instructions.<br>[22:54] Okay.<br>[22:56] So, okay. So, you're creating a a<br>[22:58] location to paste the snippet, then<br>[23:00] parse it, store it as a as a CPT or<br>[23:02] whatever. Create settings that control<br>[23:03] how it is loaded, adjust it. We also<br>[23:06] allow block JSON to be pasted as well to<br>[23:08] create a setting with options for the<br>[23:11] scripts that allow part of the settings<br>[23:13] control.<br>[23:17] Okay.<br>[23:19] Part of the settings control where the<br>[23:20] sims are added to the page or bundled<br>[23:21] into larger external file. Okay. So,<br>[23:24] >> so the JSON describes the options for<br>[23:27] the snippet,<br>[23:31] >> right? So, what kind of like So, what<br>[23:36] would be an example? So, you have a you<br>[23:37] have a like so like and and again I may<br>[23:40] not be just not grocking this properly,<br>[23:42] but at the end of the day, this sounds<br>[23:44] like the ability to insert arbitrary<br>[23:47] code and then have it rendered in<br>[23:50] certain places. That's a that's a super<br>[23:52] distilled like you know no nuanced<br>[23:56] um sort of description of that. Is that<br>[23:59] accurate?<br>[24:03] >> A li a subset of<br>[24:06] code um not anything<br>[24:10] >> right? But how how so how would how<br>[24:12] would we control how would you control?<br>[24:15] >> So someone wants to put in a like they<br>[24:17] want to they want to drop a scripty<br>[24:24] >> heyy<br>[24:26] >> oh my god it's the longest<br>[24:28] >> that is the longest one so far it's<br>[24:30] crazy. Uh no you're not interrupting.<br>[24:33] It's all good. It was an automated thing<br>[24:34] I did. Um,<br>[24:36] so like what would keep somebody from<br>[24:38] putting a two some script tags with u<br>[24:42] some malicious code in there? Like how<br>[24:45] how would that be validated or would it<br>[24:47] be validated I guess is the question.<br>[24:54] >> Um, probably it is somebody could do<br>[24:59] that. They were clever, but we could<br>[25:01] probably also put some in that certain<br>[25:04] things are not not allowed is valued<br>[25:07] because we actually pass the context.<br>[25:11] Um,<br>[25:14] >> right. Okay. I mean, that's a problem.<br>[25:16] >> How is this how is the risk any greater?<br>[25:23] >> Sorry, go ahead. And<br>[25:25] >> someone just pasting it into the header<br>[25:27] or the footer.<br>[25:30] Um, it's not it's not I think it's I<br>[25:33] think I don't think it's any greater<br>[25:35] risk. I think it is um just core<br>[25:38] approved risk if that makes sense.<br>[25:41] >> If that's if if the intention is for<br>[25:43] this to be part of WordPress core, then<br>[25:45] we're giving people license to shoot<br>[25:47] them in the foot to shoot themselves in<br>[25:48] the foot by just dropping<br>[25:52] any random snippet. I mean, again, I I<br>[25:55] don't know the full scope of this, so<br>[25:57] I'm I'm not saying no, it's a bad idea.<br>[25:59] I'm just like wondering, you know,<br>[26:01] >> it's it's a mad idea at the moment.<br>[26:04] >> I'm just<br>[26:08] >> Yeah. Okay. Well, cool. Well, I mean, I<br>[26:10] don't think it's impossible to do this,<br>[26:13] >> you know? I don't think I think I think<br>[26:15] it's it's sort of like<br>[26:16] >> it's the same reason why SVGs are so<br>[26:19] controversial in core, I think. Right.<br>[26:21] Um because it's very hard to make them<br>[26:24] safe.<br>[26:25] >> Yeah.<br>[26:26] >> Because there's so many permutations and<br>[26:27] iterate and and options and and things<br>[26:29] and like you know so I think we're kind<br>[26:32] of treading in that territory. But<br>[26:34] what's Kevin saying? You totally tell me<br>[26:39] >> you can have custom GS runtime val code.<br>[26:41] I do it with my CSS plugin. Yeah. So<br>[26:43] that's I mean there I think there's<br>[26:45] technical solutions to this for sure. Um<br>[26:48] I think there's two questions. one is it<br>[26:50] is it a plugin or is it part of core?<br>[26:52] That's probably the the the big one. And<br>[26:55] if it's part of core, that's a huge uh<br>[26:57] conversation. It probably should start<br>[26:59] out as a feature plugin anyways, right?<br>[27:02] Like that's<br>[27:03] >> Yeah,<br>[27:04] >> that would be my<br>[27:05] >> Yeah,<br>[27:06] >> you be able to iterate on it and to see<br>[27:08] if it becomes use.<br>[27:10] >> Yeah, for sure.<br>[27:12] >> Yeah. and.org would probably never<br>[27:14] accept a plugin like that. But if the<br>[27:15] intention is is is not plugin like that.<br>[27:21] >> Uh probably the JS runtime I think is<br>[27:24] what Kevin's talking about.<br>[27:27] Oh yeah, I I think Kevin's talking. So<br>[27:29] he has a J a custom JS runtime that<br>[27:31] validates the code. He has that with a<br>[27:33] CSS plugin, right? And uh and I think<br>[27:37] he's referring to.org not wanting to<br>[27:39] accept a plugin that does that. not<br>[27:41] necessarily what you're trying to do,<br>[27:42] but like what what he was doing. He said<br>[27:44] took him took me a lot of effort to get<br>[27:46] the the CSS. So, um, but I mean, if it's<br>[27:50] a feature plugin, that's not<br>[27:53] >> I don't It's a cool idea. It's a cool<br>[27:55] idea.<br>[27:59] >> Paul, you've always got cool ideas every<br>[28:01] time I talk to you. Like, hey, let's<br>[28:02] parse all schema.<br>[28:05] >> What's that?<br>[28:08] >> Yeah. Um and and we have a collection of<br>[28:12] like buttons that you can like search<br>[28:14] for snippets that are formatted<br>[28:18] Jason hand on it and so you could like<br>[28:24] select your chatbot you want to do<br>[28:27] creates a setting page. You fill the<br>[28:30] values in default values put your key in<br>[28:35] and bingo it works. And we can do things<br>[28:38] like putting it in the footer wherever<br>[28:40] we can,<br>[28:44] >> right?<br>[28:45] >> Because the instructions always say put<br>[28:47] it in the head.<br>[28:56] >> Yeah. Yeah, I think that makes sense.<br>[28:58] Having a plug would be better, though.<br>[28:59] Yeah. Kind of like a plugin. Yeah. I<br>[29:01] mean, it sounds like um I mean, you<br>[29:06] know, you just got to get the Have you<br>[29:08] started any work on it or is this just<br>[29:10] just an idea at this point?<br>[29:14] >> No. Um I want to knock it around.<br>[29:17] >> Oh, you made a wise choice, my friend.<br>[29:20] >> Thanks for the sub, Marcus. Appreciate<br>[29:22] you. Um that's awesome. Um yeah, we're<br>[29:27] doing viewer comments, too. So, if<br>[29:29] anyone else if all you need is a Twitch<br>[29:30] account and you need to be watching and<br>[29:32] then you can you can come on in and we<br>[29:34] can we can we can discuss whatever you<br>[29:36] want to talk about. There is a bit of a<br>[29:38] delay though I think when I talk and<br>[29:40] then Paul you're you're hearing it a few<br>[29:42] seconds after me. So, it's sort of like<br>[29:43] when you see the the news anchors in<br>[29:45] another part of the world. So, I don't<br>[29:47] know. Maybe that's just way the way I<br>[29:48] have it set up. So, we'll figure it out.<br>[29:50] But, um yeah. So, if you want to jump<br>[29:53] on, just go do a call in through Twitch<br>[29:55] and you can come on talk with me and<br>[29:57] Paul and whoever else wants to join,<br>[30:00] chat about whatever.<br>[30:06] What else you working on today uh these<br>[30:08] days, Paul?<br>[30:16] >> Um, still doing stuff on Matador Matador<br>[30:19] jobs. Still doing business. I actually<br>[30:23] Mhm.<br>[30:25] >> I went and had a look at the schema.org.<br>[30:28] Moved it forward a little bit.<br>[30:31] >> Oh yeah, that's cool.<br>[30:35] >> Uh yeah, there's a bit of a pull request<br>[30:38] out there. Um<br>[30:40] >> Oh, it's like is this on my repo? I<br>[30:42] should just give you full access to it.<br>[30:44] Hold on.<br>[30:46] >> Yeah, it's a request to go to your repo.<br>[30:50] Okay, let's see what we can do here.<br>[30:54] Let's go take a look.<br>[30:58] Did Did you fork it or like I can just<br>[31:00] give you the the repository if you want.<br>[31:02] What's the thing called? Uh<br>[31:04] >> I forked it.<br>[31:06] >> Oh, you forked it. Okay.<br>[31:07] >> No, I prefer No, it's this one.<br>[31:14] >> Oh, wait. Is is this the one?<br>[31:19] >> Should I do a pull request?<br>[31:21] >> No, I don't see a pull request.<br>[31:24] Unless it's<br>[31:25] >> Oh, let me do let me find do a pull<br>[31:28] request so you can see it.<br>[31:30] >> Yeah, you can defin I'll I'll I'll just<br>[31:32] merge it.<br>[31:34] YOLO. I'll do a YOLO merge.<br>[31:40] All right, listen. Those folks that are<br>[31:44] on the stream that are not calling in, I<br>[31:46] want you to call in right now. Come on,<br>[31:48] let's do it. Let's have fun.<br>[31:51] You don't even have to go on camera if<br>[31:52] you want. You can just do audio.<br>[31:56] Paul's the only brave soul here.<br>[32:00] Wow. Is this from two years ago? Oh my<br>[32:02] god.<br>[32:04] >> All right.<br>[32:04] >> Is that Is that how long it's been since<br>[32:06] since we<br>[32:07] >> Yeah, it's a pull request now.<br>[32:09] >> Is there Okay, let's take a look here.<br>[32:11] you working here. Um, I I've got it<br>[32:15] showing out the content,<br>[32:18] but I haven't got<br>[32:21] but I haven't got it doing the looping<br>[32:23] because we need to<br>[32:24] >> is this content object or a text field?<br>[32:29] And so we need to down the the data<br>[32:32] stack we've got so that we<br>[32:37] end up at the native text or number<br>[32:41] values.<br>[32:44] Right.<br>[32:47] >> Yep.<br>[32:47] >> All right.<br>[32:48] >> Um, so<br>[32:49] >> but we're quite close. It really is<br>[32:52] getting<br>[32:56] >> Yeah, I haven't really uh I I I haven't<br>[32:58] really looked at it in a while. Where<br>[33:00] did we end up with this? I think we<br>[33:01] ended up with like Did we get an admin<br>[33:04] page? I don't remember how how how this<br>[33:06] all worked out.<br>[33:08] >> There's an admin page. Um, and I've made<br>[33:13] a<br>[33:16] block that that starts to show the<br>[33:19] inputs.<br>[33:24] >> Oh, right. And doesn't it like Oh my<br>[33:26] god. Did Did you Did you do this or did<br>[33:28] I do this? I don't think I did this. Did<br>[33:30] I do this?<br>[33:32] >> Oh, maybe I did. I don't.<br>[33:34] >> So, that's this is generating patterns,<br>[33:37] right?<br>[33:38] >> I can't remember. I didn't remember. So,<br>[33:41] selected patterns.<br>[33:43] >> Holy jeez.<br>[33:46] >> Um,<br>[33:47] >> and some of this is AI generated. So,<br>[33:51] >> oh yeah. Yeah, that's probably that's<br>[33:54] probably how I did it. If I did it<br>[33:56] variations, we got on your index. We got<br>[33:59] variations.<br>[34:02] >> I did.<br>[34:04] >> Oh, okay.<br>[34:07] was there there must have been oh one<br>[34:09] podcast I don't know cool well I hope<br>[34:12] that this is something that uh carries<br>[34:14] on that you're able to to work with<br>[34:16] >> I would love to work more on this in<br>[34:19] future<br>[34:24] >> here oh right okay this is sort of like<br>[34:31] plugin controls h interesting Coolio.<br>[34:37] All right, I'm put my my music back on<br>[34:38] if that's okay with you, Paul. Got to<br>[34:40] have that heavy metal rocking. Um,<br>[34:45] turn it down.<br>[34:48] There we go. So, something I'm working<br>[34:51] on right now, and I don't know why this<br>[34:52] is doing this, but I'm working on um a<br>[34:56] couple of blogs. So, like I said, this<br>[34:57] is um this is me going just diving head<br>[35:00] first into all things type T type<br>[35:03] script. So, um, as we know the the the<br>[35:07] blocks package, this is really annoying.<br>[35:12] Come on.<br>[35:14] Did this yesterday now? Now I know why<br>[35:16] it's not doing that. Why can't I find<br>[35:17] the name space react<br>[35:21] or JSX or element?<br>[35:24] >> You need to move me across the screen.<br>[35:28] >> Oh. Oh, okay. Let me just uh let me just<br>[35:32] uh change that like this.<br>[35:35] How's that? There you go. Uh let's go<br>[35:38] across. Nah, let's go over here.<br>[35:41] >> There we go.<br>[35:41] >> That out of people's way.<br>[35:43] >> That's what we'll do. So, anyways, what<br>[35:45] I've been working on is I have this<br>[35:47] we're doing this project at uh from a<br>[35:50] job where we're we're building like a<br>[35:53] showcase of stuff for for Oh, Lord of<br>[35:57] Blood. He's calling in. All right.<br>[35:59] Hold on. Here we go. Let's see what<br>[36:02] happens.<br>[36:09] All right, let's see now. Better be<br>[36:12] wearing a shirt. Lord of Blood.<br>[36:15] Serge implementing our dev server. Oh,<br>[36:17] boy.<br>[36:19] All right. I don't know what what<br>[36:21] happened there, but uh I invited you,<br>[36:25] Lord of Blood. Get you in here whenever<br>[36:27] you show up. I don't know. Takes seems<br>[36:29] to take a second. So, this is my first<br>[36:31] time doing it. We're all right, Troy,<br>[36:33] get your Twitch account open and jump on<br>[36:34] the call here, man. Let's do it. Let's<br>[36:37] do it. Y'all can tell me what I'm doing<br>[36:38] wrong with with my TypeScript.<br>[36:41] Oh, there's Troy right there. All right,<br>[36:42] here we go. Oh, this is getting crazy.<br>[36:44] We might have too many people. I'm<br>[36:47] excited. I don't know where you're going<br>[36:48] to show up. I'll probably have to move<br>[36:49] move this around.<br>[36:51] Um, anyways, Kevin, you'll know why.<br>[36:54] Okay. So anyway, so in WordPress uh for<br>[36:58] example in our um in in our blocks<br>[37:01] package there there's no proper types,<br>[37:03] right? So we're running into some<br>[37:05] problems there. So uh like so<br>[37:12] annoying. Um<br>[37:14] so to get around doing this I' I'm I'm<br>[37:17] doing my own types. I'm I'm declaring a<br>[37:19] module and I'm adding all of my types in<br>[37:21] there. Oh, there's Troy.<br>[37:23] Let's just see. Previewing.<br>[37:31] All right. I'm going to just push you to<br>[37:32] the call there.<br>[37:35] Where's Troy? Oh, better move you guys.<br>[37:37] Uh maybe I'll put you across the top. Is<br>[37:40] that There we go.<br>[37:44] Troy, are you talking?<br>[37:54] I think<br>[38:05] >> Oh, there he is. I see you, Troy. Can I<br>[38:07] hear you, though? That's the question.<br>[38:08] Here, I'm turn my my my music up here.<br>[38:23] Troy, can you hear me? Okay. Can you<br>[38:26] hear me? Okay, Troy,<br>[38:28] >> I can. Can you guys hear me?<br>[38:30] >> There we go. Okay, I think I know what I<br>[38:32] was doing wrong. I can hear you. Um, I<br>[38:35] think chat can hear you. Just go ahead<br>[38:37] and talk for a sec.<br>[38:39] >> Hello.<br>[38:40] >> Yeah. Okay. I think I think the problem<br>[38:42] is you're getting Yeah. All right. So, I<br>[38:45] didn't set this up properly. Lord of<br>[38:47] Blood, where are you? I don't see you in<br>[38:49] there. Okay. What What was happen? So,<br>[38:50] I' I've got this window uh behind the<br>[38:53] scenes here, and you all show up o o<br>[38:55] over here and stuff, and I had my my mic<br>[38:57] muted, and I think what was happening<br>[38:58] was you're hearing me delayed through<br>[39:00] the through the the the stream. And so,<br>[39:03] I I need to turn my mic on here so y'all<br>[39:05] can can uh can hear me properly, I<br>[39:09] think, because there's no delay now,<br>[39:10] right?<br>[39:12] Doesn't seem to be, but I don't see your<br>[39:14] face. So, I can't see if there's a delay<br>[39:15] or not.<br>[39:18] >> Oh, you can't see my face.<br>[39:20] >> No, I can I can see Paul, but you're<br>[39:22] like It looks like your video is off.<br>[39:24] >> You're You're responding almost<br>[39:25] immediately after I'm I'm talking, which<br>[39:27] which was not the case with Paul because<br>[39:28] I think hearing me through<br>[39:31] >> the Twitch pop up.<br>[39:34] >> This is the the stream together thing<br>[39:37] that I'm in. So, like I I manage this.<br>[39:39] You can. Yeah. A countdown from five.<br>[39:42] Well, if I turn my my video on, you'll<br>[39:44] you'll see me. Don't send.<br>[39:47] >> You'll see me. You'll see myself. And we<br>[39:49] don't need that.<br>[39:50] >> Nobody needs that. You can already see<br>[39:52] me. Um, but Lord of Blood, where you at,<br>[39:55] man? I saw you in there. And then did<br>[39:58] you get nervous?<br>[40:05] If it turns up turn the video in the<br>[40:06] app, you'll lose. Yeah.<br>[40:10] Well, I can turn my camera on, but I<br>[40:11] don't want my camera on in the<br>[40:12] background here because I'll I'll I'll<br>[40:15] lose I I I did this before. Oh, I see.<br>[40:18] Lord, uh I did this with um Justin<br>[40:21] Tadlock once and I left my video running<br>[40:23] in this thing and then it just basically<br>[40:26] killed my bandwidth. So, I'm turning all<br>[40:27] the videos are off in here, but I can<br>[40:29] see you guys on stream through OBS and<br>[40:32] I'm assuming you can see me and we can<br>[40:33] talk. This is so much fun.<br>[40:37] So, Troy, what was your meeting about?<br>[40:41] >> Oh, we were just looking at implementing<br>[40:43] uh Surge on our servers just to get some<br>[40:45] some better full page caching going on.<br>[40:48] >> Nice, nice, nice, nice, nice. Oh, um,<br>[40:51] speaking of caching, I'm thinking about<br>[40:53] doing a stream on uh word on old like an<br>[40:55] old school topic that's near and dear to<br>[40:57] my heart is uh uh like like caching. So<br>[41:02] like the transient API, WP cache that<br>[41:06] all that stuff. I'm<br>[41:08] >> I don't know why. Oh, who is that?<br>[41:11] >> Paul, do you just rip a fart?<br>[41:13] >> Do do you include the ability, you know,<br>[41:16] how to manage clearing caches?<br>[41:20] >> Clearing what kind of caches? Like<br>[41:21] transit caches or like<br>[41:24] >> one of the problems I<br>[41:27] >> um no page caches. So, one of the<br>[41:30] problems I have is that I have a form<br>[41:37] >> with a with a nons in it and that nons<br>[41:40] um gets expired and the b is cashed.<br>[41:47] >> Um<br>[41:52] >> so fails.<br>[41:54] >> Yeah, because it's cached. Um, can you<br>[41:57] update the knots on the form submit?<br>[42:01] Like can you<br>[42:04] how your So is your form is your form<br>[42:06] being done like is it being submitted<br>[42:07] through like Ajax or submitted through<br>[42:10] >> like a um<br>[42:13] >> because if what you can do<br>[42:15] >> submit back to the page<br>[42:19] >> submit back to the page I mean you could<br>[42:22] but your your knots is being generated<br>[42:23] on the page right? So I don't I this<br>[42:26] might be a dumb idea but with the way<br>[42:28] that that we used to do it back in the<br>[42:30] day when I was at Tenup and we were<br>[42:31] working with VIP VIP has has extremely<br>[42:35] aggressive page caching. So you couldn't<br>[42:37] have anything on the page that that<br>[42:39] >> that was like dynamic in the sense of<br>[42:41] like user in information. So if you're a<br>[42:43] logged in user you couldn't like show it<br>[42:45] in PHP because it it would get cached.<br>[42:47] So a lot of times what it would do what<br>[42:49] we would do is we would load the page<br>[42:51] and then run JavaScript immediately to<br>[42:53] update portions of the page that need to<br>[42:55] be updated based on the user. So you<br>[42:57] could do something like that because<br>[42:58] your knots is just it's stored in a in<br>[43:00] an input field, right? Like it's just<br>[43:02] it's stored in there.<br>[43:03] >> So you could do something like that<br>[43:04] maybe where the page loads and then once<br>[43:07] it's loaded the knots is updated with a<br>[43:09] like using Ajax where where you can<br>[43:11] generate the knots on you know and then<br>[43:14] insert it that way. I'm I'm I'm not I'm<br>[43:16] not sure. It's been a while since I've<br>[43:17] done that. I know that this this is a<br>[43:20] problem that has been solved. Troy, what<br>[43:23] do you think?<br>[43:25] >> We have got some code doing that kind of<br>[43:28] >> Yeah.<br>[43:32] >> Yeah. This is not an area that I'm<br>[43:34] really overly knowledgeable on. So, I'm<br>[43:36] not going to put my foot in my mouth and<br>[43:38] say something completely incorrect.<br>[43:39] >> Do it, man. Put your foot in your mouth.<br>[43:41] Do it. Just do it. Just um expose all of<br>[43:44] your nonsas in the console. That's the<br>[43:46] way to do it. Just have them all out<br>[43:48] there and all your API keys. That's<br>[43:52] That's the That's the correct way of<br>[43:53] doing it.<br>[43:56] >> Yeah. Just put all the API keys up<br>[43:57] there. Someone else do that so we can<br>[43:59] use them. Yeah.<br>[44:01] >> Exactly. Expose them to chat bots and to<br>[44:03] AI. It's the way to do it, man. Telling<br>[44:06] you. Um I I would try something like<br>[44:09] that, Paul. Um because I don't like I<br>[44:13] don't I mean<br>[44:14] >> Yeah.<br>[44:15] >> The thing is<br>[44:16] The other part is that<br>[44:17] >> really they're not truly numbers just<br>[44:19] once in<br>[44:22] >> sorry what's that<br>[44:25] >> in matador jobs we have a a a background<br>[44:29] task which updates a list of jobs every<br>[44:32] 10 minutes<br>[44:34] um and so<br>[44:36] you need to clear caches regularly so<br>[44:41] that the new jobs appear otherwise<br>[44:43] recruiters get really confused Why isn't<br>[44:46] my job showing on the page?<br>[44:48] >> Yeah. No, no, no. That that totally<br>[44:50] makes sense. Um,<br>[44:55] >> yeah, I I I would I would probably try<br>[44:57] to refresh that section of of the page<br>[44:59] using JavaScript of some form, just<br>[45:02] injecting the knots or or on form<br>[45:05] submit.<br>[45:06] >> Yep.<br>[45:07] >> Before like before the or Yeah. Well,<br>[45:10] yeah. I mean, you could do it with<br>[45:11] JavaScript as well, but then I mean, you<br>[45:13] need to have JavaScript enabled, but<br>[45:15] which is like everyone's site, but you<br>[45:16] could do something too that like when<br>[45:18] the form button is is submitted, you<br>[45:20] could get a refreshed version of that<br>[45:22] knots and then and then and then submit<br>[45:24] the form, you know.<br>[45:27] I don't know. I feel like I'm<br>[45:29] overthinking it. I feel like I'm<br>[45:31] overthinking it. I am overthinking it.<br>[45:33] The L the L is saying what? Nice to see.<br>[45:35] I discovered people doing some stuff in<br>[45:37] that<br>[45:42] Sorry, you've got code doing some of the<br>[45:44] stuff in the um in the submit process.<br>[45:51] >> Yeah. No, I stopped because I start<br>[45:52] hearing the echo. Um we we've got code<br>[45:55] that's doing some JavaScript to do<br>[45:57] refresh on.<br>[46:00] >> Okay.<br>[46:04] >> But it's never perfect.<br>[46:08] >> Yeah. And I don't I don't really know a<br>[46:10] ton about caching and and clearing and<br>[46:13] all that stuff. But one of the things we<br>[46:14] were looking at in the last couple of<br>[46:15] days with the surge plugin was just just<br>[46:18] testing to make sure like it it was cuz<br>[46:20] it clears the cache for each individual<br>[46:22] page as new content gets created. I<br>[46:24] don't know by looking at that code is<br>[46:26] something that you could pick up on from<br>[46:27] there that might work to solve some of<br>[46:29] the issues you're struggling with here.<br>[46:37] >> Okay. Yeah, the the love's got a good<br>[46:40] point, too, because I mean, if you have<br>[46:42] an Ajax request that's generating that<br>[46:44] for a non-logged user, then anybody can<br>[46:46] just get nons for your site. So, it's a<br>[46:49] little it's a it's a tough nut to crack<br>[46:52] for sure.<br>[46:53] >> Yeah. I'll drop the the link to that<br>[46:55] plugin in the chat.<br>[47:03] I saw this one a while ago. It's pretty<br>[47:06] good plugin.<br>[47:18] Do you have to cache the form? Like what<br>[47:20] if you didn't what if you I I guess page<br>[47:22] caching is controlled outside of your<br>[47:25] the plugin, right? like it it like you<br>[47:29] there wouldn't be a way to<br>[47:31] to accurately say I don't want this I I<br>[47:35] don't I I don't want this page cached<br>[47:37] like the user would have to do it<br>[47:38] because you because you could cache all<br>[47:40] of the contents of the page using like a<br>[47:42] transient<br>[47:43] and cache the HTML so you're not doing<br>[47:45] lookups like Crazy.<br>[47:58] >> I'm not getting any audio.<br>[48:00] >> Go back to your type script stuff.<br>[48:04] >> Sorry. Were you not hearing me now?<br>[48:06] >> No, I am now.<br>[48:08] >> I wasn't before.<br>[48:11] >> Okay. Um, cool. All right. Cool. Yo. Um,<br>[48:16] anyways, yeah, so the TypeScript stuff<br>[48:18] that I'm working on is uh basically<br>[48:21] trying to solve the problem of not<br>[48:22] having like um um<br>[48:26] uh React, sorry, what am I saying? Uh<br>[48:28] types and then trying to use types<br>[48:31] because that's not really a thing that<br>[48:32] you can do. Um so I'm doing this really<br>[48:35] badly, I'm sure. But basically what I'm<br>[48:37] doing is I'm converting everything to to<br>[48:40] to type TypeScripts and then I'm just<br>[48:42] I'm creating I'm sort of I'm declaring<br>[48:44] the modules that that are missing types.<br>[48:46] And this has actually been a really<br>[48:48] little fun experiment because I'm I'm<br>[48:50] trying to learn to learn all the good<br>[48:53] stuff, right? Just want to say happy new<br>[48:55] year.<br>[48:58] Oh, sorry. Lord of Blood. Yeah, it' be<br>[49:00] good to have you on. You're having<br>[49:02] trouble getting set up with Twitch. That<br>[49:03] sucks. Well, you have some homework for<br>[49:06] next week.<br>[49:07] Um, but I'm I'm taking this course. I<br>[49:10] bought this course a while ago called<br>[49:12] Totally TypeScript. It's kind of cool.<br>[49:14] Um,<br>[49:17] and so I'm totally<br>[49:21] totally Typescript by Matt PCO is is his<br>[49:24] name. I think Kevin told me about this<br>[49:27] guy. I don't know.<br>[49:30] uh he has a a cheat sheet for a um uh<br>[49:34] TypeScript config which is really cool<br>[49:36] but it's like all these workshops<br>[49:38] there's like tons of stuff like you're<br>[49:39] learning all about um lots of stuff<br>[49:42] right now I'm on the mutability section<br>[49:44] where we can learn for example object<br>[49:47] property inference and recreating read<br>[49:49] only properties and things like that so<br>[49:51] it's it's kind of new and cool uh well<br>[49:54] this this was on sale a couple like last<br>[49:57] year I think and I I got it because I<br>[49:59] mean it's it's good. I will say that<br>[50:01] some of the things are like kind of like<br>[50:04] it's it's well here I'll show you I'll<br>[50:06] show you a uh like an example. So let's<br>[50:08] look at like one of the the basics. So<br>[50:11] let's go like basic types in in<br>[50:13] TypeScript. So he has a little video he<br>[50:15] explains it all the video. I'll just<br>[50:17] jump in which is<br>[50:18] >> change things that are being assigned to<br>[50:20] this.<br>[50:21] >> All right. And then you do it all in the<br>[50:23] browser which is really cool. So like<br>[50:25] this is this is not right. Okay. So, we<br>[50:26] have to change that to number, you know,<br>[50:29] so on and so forth. And then he gives<br>[50:31] you the solution. So, it's it's pretty<br>[50:33] cool. Small little bite-sized things. I<br>[50:35] I'm quite enjoying it. I do think that<br>[50:38] some of the lessons are a bit like,<br>[50:41] okay, we've already learned that<br>[50:42] concept. Now, we're just kind of doing<br>[50:43] it in a slightly different way. But, but<br>[50:44] that's the the simpler stuff. We're<br>[50:46] getting into more complicated things.<br>[50:48] Like, I learned about pick and omit,<br>[50:49] which is really cool. Something I had no<br>[50:52] idea about before. It's 2026 and I don't<br>[50:54] know anything about TypeScript. So<br>[50:56] that's what I'm learning right now. But<br>[50:59] and to do that I find it's better for me<br>[51:02] to learn on on projects, right? So like<br>[51:04] so I have the I have these two blocks<br>[51:07] and there there's going to be three<br>[51:08] blocks soon or than later. And so I'm<br>[51:11] just trying to get some ideas like just<br>[51:14] trying to in put the types in that I<br>[51:16] need so like so this doesn't fail,<br>[51:20] right? Um, so I'm defining inside of my<br>[51:23] register block type in in the types of<br>[51:24] that that it's going to take a name and<br>[51:26] it's going to take some params. And so I<br>[51:28] have these register block params that<br>[51:30] I'm I'm defining. And I I love this<br>[51:32] partial thing because it means that if I<br>[51:35] didn't do partial, check this out.<br>[51:39] Everyone here is is going to know about<br>[51:41] this. So that this is yelling me because<br>[51:43] it's it's expecting things that aren't<br>[51:45] there. It's missing some stuff, right?<br>[51:47] But they're all I don't need them<br>[51:49] because we don't always pass every<br>[51:51] single one of these parameters to the<br>[51:54] register block type. Right? So it's<br>[51:58] pretty cool.<br>[52:00] I'm pretty excited about it. Everyone<br>[52:03] everyone watching is like, "Yeah, okay,<br>[52:04] Ryan. Basics. Thanks.<br>[52:08] Shut up."<br>[52:10] Um, I had to do the attributes better<br>[52:13] here though I think because<br>[52:15] >> go into core eventually.<br>[52:18] >> Say again.<br>[52:23] >> Do you think the typing could go into<br>[52:25] core?<br>[52:26] >> Yeah, absolutely. I think we need it.<br>[52:28] Um, I I I'm actually working on<br>[52:32] helping to get that done. Um because the<br>[52:36] the thing the thing that we don't have<br>[52:38] so there is there's a ton of TypeScript<br>[52:40] in core but there's no TypeScript for<br>[52:42] some of the the blocks for the packages<br>[52:46] that extenders use. So the the us the<br>[52:49] people that are building on building<br>[52:51] blocks building a lot of this stuff they<br>[52:53] don't have types. Um so that's part of<br>[52:56] what this is. Uh trying to get some of<br>[52:59] these these types.<br>[53:02] Well, yeah, there's there's a bit of<br>[53:04] that, too, Kevin. It's it really it's<br>[53:07] there's a lot it's just a ton of<br>[53:08] refactoring, right?<br>[53:11] Um I I agree with you. I I think the<br>[53:13] policy is anything new is being written<br>[53:15] in Typescript. Um, and then we're trying<br>[53:18] to address we're we're trying to address<br>[53:21] um some like this is the original poll<br>[53:24] request where we're talking about<br>[53:26] getting stuff in in in into TypeScript.<br>[53:29] And there's some really great comments<br>[53:31] in in here that I would encourage you to<br>[53:33] read. The one thing like Dennis Nell,<br>[53:35] who's like the smartest dude in the<br>[53:37] planet, um had a really great um point<br>[53:42] in in in that like some of these some of<br>[53:45] these types um are so generic that it's<br>[53:49] almost like you might as well just use<br>[53:51] any, which doesn't really help that<br>[53:52] much. But um so there's sort of there's<br>[53:55] there's a lot of conversation back and<br>[53:57] forth about whether or not doing like<br>[53:59] moving everything to TypeScript like a<br>[54:01] TS file or TSX file, right,<br>[54:05] versus output and core makes it hard to<br>[54:07] go for. Yeah, for sure. Yeah, I mean<br>[54:08] it's hard. It's very very hard. Like I<br>[54:11] like so this pull request so this<br>[54:13] original um pull request did a whole ton<br>[54:17] of TypeScript work and it kind of got<br>[54:20] basically shut down a little bit. Well,<br>[54:21] not shut down, but just basically um uh<br>[54:26] it was deemed to be too big of a blift,<br>[54:30] I think. So, what I'm trying to do is I<br>[54:32] took the work that was done here and I<br>[54:34] move and I just pulled the types out.<br>[54:36] So, if and and my my my plan is is to<br>[54:40] peacemeal merge some of these types in<br>[54:42] so we can start getting them added and<br>[54:44] it it's done through through like doc<br>[54:46] blocks and stuff like that, right? So,<br>[54:47] that's how it's typed. So, there's a ton<br>[54:50] of this work that that's being done um<br>[54:53] in a types folder and then we're just<br>[54:55] referencing those types in the in the<br>[54:58] original pull request. I think what they<br>[55:00] were doing was we they were doing the<br>[55:02] types and then they're also updating the<br>[55:06] the know the um yeah so like all of the<br>[55:11] doc blocks and everything were being<br>[55:13] were were being up updated as well. So,<br>[55:15] this is a good example of that, right?<br>[55:16] And so I think we need to get the types<br>[55:18] in in there first, get in and get that<br>[55:20] passing and then starting to add these<br>[55:22] types to the codebase as well and then<br>[55:24] we'll get that done. I mean in the<br>[55:25] meantime I mean that there's another<br>[55:28] solution I think too where like we<br>[55:31] updated the the the packages on on on<br>[55:34] definitely typed or definitively typed<br>[55:36] whichever one that is but problem is<br>[55:38] those are so old that and there's been<br>[55:41] so many permutations. It's just better<br>[55:43] to get it in core because because then<br>[55:45] then once it's in core um because we'll<br>[55:48] get we'll we'll get type support faster.<br>[55:52] Um<br>[55:53] okay, how can I explain this? So if we<br>[55:56] merge these changes into the package,<br>[55:58] that package gets updated every two<br>[56:01] weeks when Gutenberg uh when the release<br>[56:04] candidate for Gutenberg is is pushed<br>[56:06] out. That's when these packages get get<br>[56:08] released. So we'll get types support<br>[56:10] like super fast like before 7.0 assuming<br>[56:14] we let's say we merge this stuff up<br>[56:15] tomorrow we'll we'll we'll probably get<br>[56:17] it either next week or or the week<br>[56:20] after. So you you can install the<br>[56:21] package and and and have immediate type<br>[56:23] support, right?<br>[56:25] >> No, you're you're totally right. This is<br>[56:27] a really good point. Uh where is that?<br>[56:33] Uh spotlight message like this is a<br>[56:35] great point. Oh, can't see it because I<br>[56:39] put this behind um<br>[56:45] over there. Let's do that. Sorry. Let's<br>[56:46] do that again.<br>[56:49] All new code is TypeScript anyways.<br>[56:51] Yeah. So, like Oh, not that one. It's<br>[56:54] this one. Uh probably<br>[56:58] what Anyways, good point. Um not Yeah,<br>[57:02] but the thing is it's like it's it's<br>[57:04] there's a difference between So what I'm<br>[57:06] finding is there's very much a<br>[57:07] difference between um implementing it<br>[57:10] and using it, right? So if if that makes<br>[57:13] sense, like writing the types and and<br>[57:15] and adding them to the codebase is a<br>[57:18] much more complicated process than just<br>[57:20] ingesting those types when we're using<br>[57:22] them. Um because a lot of it's behind<br>[57:25] the scenes anyways, like you don't see<br>[57:27] it. So it does take a certain level of<br>[57:30] expertise but one that I don't really<br>[57:32] have and that's what I'm sort of looking<br>[57:33] at trying to get myself to to the point<br>[57:36] where you know because this is this is<br>[57:38] the exact kind of pull request that like<br>[57:41] no one writing real code for Gutenberg<br>[57:44] like working on actual features is going<br>[57:46] to have time for. It's exactly what<br>[57:49] someone like me who's like you know a<br>[57:51] hack but is paid to help can can do and<br>[57:55] move this stuff forward. So that's<br>[57:58] hopefully that's something that I I I<br>[58:00] can get done sooner than later. Love<br>[58:02] some help though.<br>[58:04] >> No,<br>[58:04] >> that's going to be an interesting<br>[58:05] transition to see<br>[58:08] >> what to TypeScript.<br>[58:10] >> Yeah, I mean I we we kind of did that<br>[58:12] with our component library and and you<br>[58:14] know there was a lot of struggles, a lot<br>[58:16] of learning um validations and stuff and<br>[58:19] and just running checks and tests were<br>[58:21] failing left, right and center like<br>[58:23] there was a big learning curve there<br>[58:25] >> really. What was the So the tests like<br>[58:28] oh the test because you're using<br>[58:29] TypeScript<br>[58:30] >> like really like TTS<br>[58:32] >> using the whole Annie was a big problem<br>[58:34] and and I I had to go back and like look<br>[58:37] at some of the old code that was a good<br>[58:38] year and a half ago I think we were<br>[58:40] really kind of struggling with that. So<br>[58:42] it it took<br>[58:43] >> fully typescript now<br>[58:44] >> in our component library not in our<br>[58:46] WordPress work right now.<br>[58:49] >> No no I mean but that's but but that's a<br>[58:52] start right? So, were you getting errors<br>[58:54] like any like can't use any because I<br>[58:56] think I think you can disable that in<br>[58:59] the TS config. I think<br>[59:01] >> that you can Yeah, you can.<br>[59:03] >> Yeah, I think there does there was a way<br>[59:04] to disable it. We we were trying to<br>[59:06] learn it and and we kind of left all<br>[59:07] those things on at the time and<br>[59:09] >> yeah,<br>[59:09] >> you know, learn how to fix it properly.<br>[59:12] >> For sure. That's what I'm sort of uh uh<br>[59:15] doing as well. Like there's this thing<br>[59:16] in here that's driving me nuts and I<br>[59:17] can't figure out why this is doing that.<br>[59:20] Uh but I have this block params which<br>[59:23] takes an object and then then that<br>[59:25] object is yeah exactly any beats the<br>[59:28] purpose of of ts it's kind of like yeah<br>[59:32] that was a comment that Phil said but<br>[59:35] anyways so there's I have this block<br>[59:37] params interface and it takes it it<br>[59:39] takes an object which is basically the<br>[59:41] attributes so the attributes can be<br>[59:42] whatever but when I pass it in here it's<br>[59:45] I I'm passing it in as an any which this<br>[59:49] is AI generated But if I to do do this<br>[59:51] and I pass it in as an object,<br>[59:54] which should be the type, I think it<br>[59:56] yells at me. Or maybe it doesn't yell at<br>[59:58] me. Let's see. Doesn't seem to be<br>[60:01] yelling at at me anymore. So So maybe<br>[60:04] it's fine. You see, I don't even know.<br>[60:08] Uh maybe it's not a problem.<br>[60:14] All right. Well, doesn't seem to be a<br>[60:16] problem anymore. So maybe that's what I<br>[60:18] needed to do. But uh but yeah, so I'm<br>[60:21] fig I'm trying to figure out a lot of<br>[60:22] this stuff like what was the other one?<br>[60:24] The it was this block I think. Why is it<br>[60:28] zoom that in? You guys can read that. Um<br>[60:34] index.<br>[60:36] Oh yeah. See now now it's yelling at at<br>[60:38] me here.<br>[60:40] I don't I don't quite get.<br>[60:46] So<br>[60:48] yeah, it's weird. Anyways, so I have to<br>[60:50] put it back to any and then it works,<br>[60:52] but I don't think that's what I want to<br>[60:54] do.<br>[60:56] Don't know. So I don't understand why<br>[60:58] this does that, but it it it makes it<br>[61:00] work.<br>[61:03] So this is the Yeah, that's the kind of<br>[61:05] stuff that that that drives me nuts. And<br>[61:07] then doing all this and having to figure<br>[61:10] this stuff all out, it's good times.<br>[61:12] Um, when you uh the testing that you<br>[61:15] were running into, Troy, what like you<br>[61:18] >> Yeah. Oh. Oh, Kevin's answering. Kevin's<br>[61:21] answering. So, that's a generic type any<br>[61:24] like any like I know what any is. It<br>[61:26] means it could be anything. Like, should<br>[61:28] I be passing something like T in in<br>[61:30] there or<br>[61:32] I I just don't get why<br>[61:35] it's supposed to be an object. Well,<br>[61:37] you're passing that type into the other.<br>[61:39] Yeah, I'm passing<br>[61:43] th this this<br>[61:46] Oh my god, did I just get raided? Sweet.<br>[61:56] Um, I just Sorry, I just saw my viewer<br>[61:59] list go like 10 million people just just<br>[62:02] showed up.<br>[62:04] Block params has a type param and<br>[62:05] expects a specific structure. Yeah, it<br>[62:07] does.<br>[62:10] Right. So, okay. So, Kev, talk uh talk<br>[62:13] me through this. Um, so this was<br>[62:16] generated by AI for me. So, the idea is<br>[62:19] attributes. We don't know what<br>[62:20] attributes is. We only know that it's<br>[62:21] going to be an object. Now, I I I can't<br>[62:23] type it as an empty object because<br>[62:25] that'll fix, right?<br>[62:28] All right. So,<br>[62:32] this is a generic, right?<br>[62:41] And Troy, if you know the answer to<br>[62:42] this, jump in, too. Same with you, Paul.<br>[62:44] I feel like I'm talking I'm talking over<br>[62:46] everybody here,<br>[62:49] but anyways,<br>[62:54] >> I'm going through examples<br>[62:56] >> in my code to see if I can find<br>[62:57] anything.<br>[62:59] >> Cool. The Lup is going to join us here.<br>[63:01] Sorry, I just saw the call-in request.<br>[63:03] We're doing call-ins, viewer call-ins.<br>[63:05] So, if you have a verified Twitch<br>[63:06] account, you are welcome to jump on<br>[63:08] board. If I don't know who you are, I<br>[63:11] might not put your camera on<br>[63:13] immediately. Uh, but that's only just to<br>[63:16] keep us from uh, you know,<br>[63:19] bad things happen. All right, the lup is<br>[63:21] going to join us. Here we go.<br>[63:24] Welcome to the stream. Um, all right.<br>[63:32] This is fun. All right, Kevin. So,<br>[63:35] explain to me how I can make this work<br>[63:37] with any object. That's basically what I<br>[63:40] want to have done. I guess I could Well,<br>[63:43] the question is this is a generic,<br>[63:46] right? This is a generic. So, it's being<br>[63:49] passed. So, I can use attributes to<br>[63:52] contain anything that's an object,<br>[63:55] right?<br>[64:03] params on edit has the signature that<br>[64:05] you need to match.<br>[64:08] Yeah. So it's defined by my block<br>[64:10] params. So it's attributes set<br>[64:14] attributes and is selected. Edit has a<br>[64:17] type. Edits type.<br>[64:21] Uhhuh.<br>[64:30] So the thing is AI generated this<br>[64:33] connection for me and I don't understand<br>[64:35] it where I use it. So I use it uh<br>[64:38] basically<br>[64:40] here right. So this is so the edit is<br>[64:45] going to be<br>[64:48] right. It's just a component. So it's<br>[64:50] going to be using this here. So it's<br>[64:53] it's returning the ReactJSX element<br>[64:55] which is what it's supposed to do.<br>[64:57] Register block has a type. It does.<br>[64:58] Yeah. It's right here. So it's going to<br>[65:00] have it's got my register and that and<br>[65:03] edit on that needs to match. Yeah. No, I<br>[65:04] I it I I I understand.<br>[65:08] So this is so register block type takes<br>[65:11] name and it takes a number of<br>[65:12] parameters. So I have a partial of<br>[65:13] register block pans because not every<br>[65:15] time I'm using it. Well, okay. If I<br>[65:18] remove this,<br>[65:20] it's yelling at me. Oh, cannot be empty.<br>[65:23] Okay. So what I'm thinking is this is<br>[65:25] supposed to be an object, right? I'm<br>[65:27] defining it as an object here. So it now<br>[65:29] it's not yelling at me, but it will yell<br>[65:30] at me here. It's not yelling at me there<br>[65:32] either. I don't understand why it's not<br>[65:34] yelling at me now. Uh,<br>[65:38] it has an any type. It shouldn't have an<br>[65:40] any type because block params has got it<br>[65:43] is selected.<br>[65:54] Oh, no problem. The lup's trying to<br>[65:57] figure out the odd. If you move the end,<br>[65:58] this should So this doesn't error. This<br>[66:01] doesn't error.<br>[66:02] Doesn't make any sense to me why that<br>[66:04] that doesn't error now. And then this is<br>[66:06] erroring because this is saying that it<br>[66:07] hasn't impressed any type. But it<br>[66:08] doesn't because this edit is being<br>[66:11] defined in here.<br>[66:16] Oh.<br>[66:17] Oh, wait. Do I need to hold on block<br>[66:20] attributes?<br>[66:23] Oh, that's what I have to do. Okay.<br>[66:26] That's what this is yelling at me over<br>[66:27] here because I need to do that and put<br>[66:32] that right.<br>[66:33] >> I gotta go. I got a bail, guys. I have<br>[66:36] >> All right, Paul. Well, thanks so much<br>[66:37] for hanging out.<br>[66:38] >> Let's do it again.<br>[66:40] >> Yeah. Well, I think I might just do this<br>[66:42] every every uh how do I restart<br>[66:45] TypeScript? Just go restart.<br>[66:49] Can I just tell it to restart<br>[66:53] type<br>[66:56] script<br>[67:00] restart server boom let's see problems<br>[67:03] two problems cannot find blog cannot<br>[67:05] okay uh the lup thanks for hanging out<br>[67:07] hey man how's it going I'm gonna just uh<br>[67:12] remove Paul thanks Paul<br>[67:15] >> hey hey can you hear me<br>[67:17] >> yep I I can hear you Hello everybody.<br>[67:19] >> Chad,<br>[67:20] >> can hear you. Thanks for joining us.<br>[67:22] This is awesome. I'm so excited that<br>[67:24] we're doing this. I can't tell you how<br>[67:27] nerdy this feels. It's amazing. It's<br>[67:29] just amazing. Okay, so block attributes.<br>[67:31] I need to do a type here for block<br>[67:33] attributes.<br>[67:34] This is the problem. Yeah, we'll we'll<br>[67:36] just we'll just not do that. We'll do<br>[67:38] Come on now. Here we go. So, block prams<br>[67:42] cannot find block I have to import block<br>[67:44] prams. Did I import blocks over here? It<br>[67:48] did. All right, we'll do that. We'll<br>[67:50] just import block ramps. Boom. Okay, so<br>[67:54] that's not yelling at me anymore. Yeah,<br>[67:56] sure. Great.<br>[67:58] Duplicate identifi.<br>[68:02] All right, so that's working. This is<br>[68:05] This makes sense. So in my missing<br>[68:07] types, I have an object. So Kev,<br>[68:12] am I explaining this? like is this<br>[68:14] correct to think of it this way that<br>[68:17] this type that is being passed in here<br>[68:20] is supposed to be an object and so I<br>[68:22] tell it that it's an object here to<br>[68:24] match this<br>[68:26] this um type definition. I think that's<br>[68:30] what I'm feeling like it should be and<br>[68:32] maybe I'm wrong but<br>[68:35] I don't know if I am. So there's that.<br>[68:38] So nothing here is yelling at me. I have<br>[68:39] no errors. So this is good. This is<br>[68:41] good. I'm very excited. The luck, what<br>[68:44] are you working on?<br>[68:45] >> Let's let's start with that. What you<br>[68:47] got? Anything that you can share?<br>[68:49] >> I'm so out of the I mean I'm working on<br>[68:52] totally different things than<br>[68:54] Typescript.<br>[68:56] >> Well, yeah. No, you don't.<br>[68:58] >> Probably.<br>[68:59] >> This is not a TypeScript focused stream.<br>[69:00] This is a<br>[69:02] >> It's probably under NDA. So, no.<br>[69:04] >> Oh, okay.<br>[69:05] >> Uh, but I was curious<br>[69:08] about I was curious about your opinion<br>[69:10] on this. social side um within the<br>[69:14] WordPress community because every time<br>[69:16] this subject reappears uh there's this<br>[69:19] discussion like there are Typescript uh<br>[69:22] enthusiasts there are one Typescript<br>[69:24] that like let's do it let's refactor<br>[69:26] everything and then there's this other<br>[69:29] side from Twitter that's oh no it's they<br>[69:33] are jumping for they're following<br>[69:35] butterflies that's impossible it's never<br>[69:39] going to happen so like it's never going<br>[69:41] to happen in in in the sense of um<br>[69:47] >> like<br>[69:49] Sorry. So, so the there's the people<br>[69:51] that that want to go full TypeScript and<br>[69:53] then there's the people that don't want<br>[69:54] to go full typist or they're worried<br>[69:56] that that it's a fad sort of thing like<br>[69:57] is that<br>[69:58] >> Yeah. Yeah. Yeah. They they are worrying<br>[70:01] that it's just a trend. It's not going<br>[70:04] to stay for a long time and so on. In my<br>[70:08] personal opinion, like I'm a centrist. I<br>[70:11] in my opinion, whatever is good for the<br>[70:15] contributor is good for the project. The<br>[70:19] important part is that people<br>[70:20] contribute.<br>[70:22] >> Yeah. No, I agree. I I don't think<br>[70:24] Typescript's going anywhere. I I don't<br>[70:26] know. I mean, it's been around a long<br>[70:28] time now. Like 11 12 years. like it's<br>[70:31] been a long like it's been around a long<br>[70:32] time if I may maybe I'm wrong with the<br>[70:36] amount of time but I just don't think<br>[70:38] it's going to go anywhere. I think too<br>[70:41] that like it can be done in such a way<br>[70:43] where where you still like because<br>[70:44] you're just ingesting the types like<br>[70:47] from a from an extender point of view.<br>[70:50] You don't need to write in Typescript if<br>[70:52] you want to. It would be really great to<br>[70:54] have the types available, right? So<br>[70:58] I don't I I don't see it as a bad thing.<br>[71:01] It's not like it's coffe script or the<br>[71:03] next flavor of like we had the same<br>[71:06] conversation about React when React was<br>[71:08] chosen for the block editor, right? Like<br>[71:10] well maybe Vue will will will be the<br>[71:12] next thing or Alpine or whatever, right?<br>[71:14] But I mean React's React's still here<br>[71:17] and it's probably going to be here for a<br>[71:19] a long time long after I quit doing this<br>[71:22] most likely. Um<br>[71:24] but and I think TypeScript's is is kind<br>[71:27] of the same the other but we we also<br>[71:29] have that escape hatch where I don't<br>[71:30] think you don't need to use TypeScript<br>[71:32] if you don't want to.<br>[71:34] >> So<br>[71:35] >> yeah but that that purpose of the<br>[71:37] architecture like that's the purpose of<br>[71:39] TypeScript. It induces the idea that<br>[71:42] everything you will use as a parameter<br>[71:44] it has to be strongly typed so you know<br>[71:47] exactly what you are about to pass. So<br>[71:50] for sure this makes it hard for people<br>[71:53] let's say that maybe they don't know the<br>[71:56] entire architecture behind the u the<br>[71:59] entire structure of the code and and so<br>[72:01] on. So it's getting harder like to to<br>[72:06] come and contribute because you will<br>[72:08] have<br>[72:09] >> because it's typescript.<br>[72:10] >> Yes. because you will have to<br>[72:12] >> Oh, I see.<br>[72:13] >> beh strict in your contribution.<br>[72:18] >> Yeah, I see what you're saying. Okay.<br>[72:21] So, there's there's a couple of parts to<br>[72:23] that, I think. And I mean, Troy, feel<br>[72:25] feel free to jump in here. Um, I think<br>[72:27] uh I think that like having types is a<br>[72:30] good thing. I mean, strictly typed code<br>[72:33] bases are good. PHP allows for it. I<br>[72:37] mean, there's like, you know, JavaScript<br>[72:40] has always been kind of the wild west<br>[72:42] because you could quite literally do<br>[72:43] whatever you wanted to do and it never<br>[72:44] really mattered and you could just like,<br>[72:46] oh, that boolean, it's a string now. Oh,<br>[72:48] great. Awesome. Like, you know, and it<br>[72:50] caused a lot of weird problems, but it<br>[72:52] also allowed you to do things that maybe<br>[72:54] you can't do in a in a in a different<br>[72:57] language. I think with lo like with the<br>[72:59] a larger code base, TypeScript becomes<br>[73:03] super important because especially when<br>[73:05] it's like people that aren't<br>[73:07] contributing all the time like if you<br>[73:08] have someone like George like<br>[73:11] >> oh you made a wise choice my friend<br>[73:13] >> Mike Corkum what hi welcome um um if you<br>[73:19] have someone who's in lives lives in the<br>[73:21] codebase all the time they understand<br>[73:22] how things work you know maybe<br>[73:25] Typescript isn't that much that that<br>[73:26] that that that not as helpful for them.<br>[73:29] But if you're like a part-time<br>[73:31] contributor or somebody who's not that<br>[73:33] familiar with the codebase, I could see<br>[73:35] TypeScript saving a lot of problems<br>[73:39] because you don't know what that<br>[73:40] parameter is. Like here's an example. I<br>[73:43] was working on a uh pull request to for<br>[73:46] the icon block to try to take uh Nick<br>[73:48] Diego's icon block and get it into core.<br>[73:51] I didn't make it in in in the 6.9, but<br>[73:54] part of what I was trying to do was add<br>[73:56] more block supports because we wanted<br>[73:58] them for height and width. And so that's<br>[74:00] not really a documented process because<br>[74:01] it's a very much core thing, right? And<br>[74:03] it's not TypeScript. It's just it's just<br>[74:05] like regular React. And it was really<br>[74:08] difficult for me to figure it out<br>[74:10] because I didn't know how any of this<br>[74:12] stuff worked. And so at least if like<br>[74:15] I'm putting in a function and I'm not<br>[74:17] telling I'm not passing what it needs to<br>[74:19] to get TypeScript can kind of be like<br>[74:21] hey this is expected in here. So maybe<br>[74:24] that can probably help a little bit<br>[74:27] but it can also be wildly frustrating<br>[74:29] like wildly wildly frustrating because<br>[74:31] you don't know if you don't know<br>[74:32] TypeScript you're like I don't<br>[74:33] understand what any of these errors are.<br>[74:34] What the hell are these angle brackets?<br>[74:36] This makes no sense. It's dumb. Right.<br>[74:38] Um so yeah I I definitely get I<br>[74:41] definitely get both sides of it. I'm<br>[74:43] literally talking in circles. I'm like,<br>[74:45] "TypeScript's great, but it sucks, but<br>[74:46] it's great, and then it sucks." So, it's<br>[74:48] like it really it's it's I can see why<br>[74:52] it's a little bit controversial.<br>[74:55] >> Yeah, the Lup is right. Like, it's I I<br>[74:56] think it's it's going to be a bit of a<br>[74:58] barrier for some folks in contributing<br>[74:59] because of that that lack of that<br>[75:01] knowledge that was there. I mean, AI is<br>[75:03] going to help kind of get over that gap<br>[75:05] rather quickly. Now, like when we had<br>[75:07] it, when we were starting on Typescript<br>[75:08] and and and we hit all of our trouble<br>[75:10] and and it was a lot of confusion there,<br>[75:13] we didn't really have the AI tools. We<br>[75:15] were just doing a more Google searches<br>[75:16] trying to understand it. So, that made<br>[75:18] it more difficult. But I find now you<br>[75:19] can just, you know, toss it into<br>[75:21] co-pilot or, you know, whatever you're<br>[75:22] using this day and uh get over the hump.<br>[75:25] But but I I do wonder how many folks are<br>[75:29] going to kind of maybe step back a<br>[75:31] little bit more, you know, if they kind<br>[75:32] of hit that TypeScript thing, you know,<br>[75:34] I don't really want to go there yet or,<br>[75:36] you know, could go either way.<br>[75:38] >> Yeah. And part Yeah. And I think part of<br>[75:40] it too is that like<br>[75:43] from from my my viewport as a my my<br>[75:47] point of view as a developer advocate, I<br>[75:49] think there's a real I think there's a<br>[75:51] need for people like me to be doing more<br>[75:54] things to explain this stuff. Like when<br>[75:57] a new API is released in WordPress,<br>[76:00] >> part of my job and and and other people<br>[76:02] job other people in in the community,<br>[76:04] their job is to be like, "Hey, this is<br>[76:06] how you use that that API and and and<br>[76:09] this is, you know, here are some<br>[76:10] examples and here's some stuff." We're<br>[76:12] not doing that for with with TypeScript.<br>[76:14] Like I don't I think there's one place<br>[76:16] in the block editor handbook that I can<br>[76:18] think of where they talk about<br>[76:19] TypeScript and how you would do it in<br>[76:21] Typescript, and it's the interactivity<br>[76:22] API. Um<br>[76:25] but um and it's just basic basic setup.<br>[76:29] So I think there's I think there's a bit<br>[76:30] of education. I mean you know because if<br>[76:33] the project wants people to come along<br>[76:36] then those that support the project and<br>[76:39] and and and are trying to support the uh<br>[76:42] you know the developers that that work<br>[76:43] with it. I think part of that that falls<br>[76:45] on my shoulders and other people like<br>[76:46] me, right? And like and the rest of us<br>[76:48] like writing articles for the developer<br>[76:50] blog on on Typescript and why you should<br>[76:51] use it and you know that kind of stuff<br>[76:55] talks on like hey you know Typescript<br>[76:57] for the rest of us sort of thing like<br>[76:59] like you know why I hate Typescript and<br>[77:01] why you should use it like that's a<br>[77:02] great talk title actually that's a<br>[77:04] fantastic talk title. Um, but you know,<br>[77:07] stuff like that. I think I I you know,<br>[77:09] and it's the same with React. Like we're<br>[77:11] trying to teach a little bit of React<br>[77:12] with the block editor stuff, right? I<br>[77:15] mean, you can't teach everybody<br>[77:16] everything, right? like you have to know<br>[77:18] a little bit to be able to get in the<br>[77:19] door.<br>[77:20] It does I can that's an interesting uh<br>[77:22] topic Phil for sure like the the<br>[77:26] >> I also think<br>[77:27] >> to entry<br>[77:28] >> there's a learning curve in the<br>[77:30] engineering life in the life in an<br>[77:32] engineer when you are at the beginning<br>[77:36] of your career you love a language like<br>[77:38] JavaScript for not being restricted you<br>[77:41] want you don't know what you want to do<br>[77:42] you want to be able to do this and that<br>[77:44] when you see errors or uh linting errors<br>[77:47] they're like I don't like that but then<br>[77:50] you evolve and you say at that point you<br>[77:53] might say you don't like Typescript at<br>[77:55] all and then you start learning you you<br>[77:58] start evolving you keep learning and<br>[78:00] then you you will hit a point and I see<br>[78:02] this in many projects plugins or when<br>[78:06] they are trying to mimic TypeScript in<br>[78:09] their structure they will force<br>[78:12] parameters in uh documentation they will<br>[78:15] try to do some type of objects that have<br>[78:17] a specific ific structure and then they<br>[78:20] will validate it or sanitize it in<br>[78:22] somehow uh and they will try to mimic at<br>[78:26] that point they try to mimic typescript<br>[78:27] they want a type uh way of doing<br>[78:32] programming but they don't want to use<br>[78:33] type typescript and I think that's the<br>[78:36] the the learning curve of a programmer<br>[78:40] you start early you want the flexibility<br>[78:42] you learn you learn and then you you you<br>[78:44] realize that man the more flexible I let<br>[78:48] this function or uh class be the more<br>[78:52] people will do crazy thing that I don't<br>[78:54] intend for them to do with this and<br>[78:58] >> exactly<br>[78:59] >> and then you go with the curve on the<br>[79:01] other side you come back and oh let's<br>[79:03] restrict this as much as we can and uh<br>[79:07] you then probably you are the kind of<br>[79:09] guy that says hey let's implement<br>[79:12] typescript and gutmer now<br>[79:14] >> yeah I mean I think what you're talking<br>[79:16] about like prior to types being able to<br>[79:19] do types in PHP like it was always<br>[79:22] called defensive programming like check<br>[79:24] to make sure that that parameter is<br>[79:26] there and it's a string and check to do<br>[79:28] this and that and the other thing like<br>[79:29] like I always thought like you know<br>[79:31] being good defensive programmer was<br>[79:32] making sure the thing was defined before<br>[79:34] you used it and make sure it was the<br>[79:35] right type before you did it and like<br>[79:37] you know typed languages do a lot of<br>[79:39] that for you and it's the it's the code<br>[79:42] completion and it's the like there's a<br>[79:44] lot there that I really think helps but<br>[79:46] Yeah, again it's like you want the<br>[79:49] flexibility until you don't, you know,<br>[79:51] until you're in a million line codebase<br>[79:53] and somebody changes a function<br>[79:54] parameter or or function definition adds<br>[79:57] another required parameter and then<br>[79:59] everything breaks and nobody knows why<br>[80:00] because they can't trace it down, right?<br>[80:03] So I don't know.<br>[80:04] >> Yeah, probably not a good idea to<br>[80:05] implement it on a large codebase all in<br>[80:07] one shot. It was a mistake. I've made<br>[80:09] that mistake several times.<br>[80:12] >> Yeah. Now you've actually got me<br>[80:14] thinking about whether or not I should<br>[80:15] take a take a have a go at trying to<br>[80:18] convert one of my plugins over to<br>[80:19] TypeScript just to see how that works<br>[80:20] out.<br>[80:22] >> Yeah, you thinking now? Well, I've tried<br>[80:25] to do it a couple times with my advanced<br>[80:26] query loop plugin, and the the the<br>[80:28] fundamental issue that that you're going<br>[80:29] to run into is that the like the types<br>[80:33] that you need, like the types that you<br>[80:37] are are are are going to need for if you<br>[80:39] want to turn all your all your files<br>[80:40] into TS files, the types that you're<br>[80:42] going to need are not provided by core.<br>[80:43] That's the problem. Like register block<br>[80:46] type, which you'll need if you're doing<br>[80:48] a plug-in with blocks, um doesn't have a<br>[80:51] type. and the types from dev from from<br>[80:53] from definitely typed are out of date.<br>[80:56] And so now you're fighting all that<br>[80:57] stuff. So like Typescript isn't fun and<br>[81:00] it doesn't it doesn't really help if<br>[81:03] you're fighting the system just to do<br>[81:07] the work. Like that's that's that's<br>[81:10] something that I've kind of struggled<br>[81:11] with with Typescript a little bit is<br>[81:13] that oh my god I just spent three hours<br>[81:16] trying to figure out why these types are<br>[81:17] wrong and breaking when I and I haven't<br>[81:19] written a line of code for the thing I'm<br>[81:21] actually trying to work on. Um you know<br>[81:24] like I'm I'm all excited because I I I<br>[81:26] got my TypeScript error to go away<br>[81:28] because I've I added some types and I<br>[81:31] didn't build anything. I just like got<br>[81:33] it to not squ have have squiggly red<br>[81:35] lines. So, I mean, yeah. And, uh, Kevin<br>[81:39] says he doesn't think that that you need<br>[81:41] many. And you probably don't. Like,<br>[81:43] depending on what your plugin is is<br>[81:45] doing, like if I were to look at my<br>[81:47] plugin, which I I would say is a fairly<br>[81:49] simple<br>[81:51] plugin in the sense of like what it's<br>[81:54] actually using. Uh, why is this not<br>[81:56] zooming in? Why is this not zooming in?<br>[81:58] >> Now, you're are you registering your<br>[82:00] variation on this plugin in JavaScript<br>[82:02] or you doing it in PHP? Uh, oh, and and<br>[82:06] I'm doing it in it's all in JavaScript<br>[82:08] and I'm actually looks like I'm trying<br>[82:09] to do it using Oh, I'm on my TypeScript<br>[82:13] branch. That's why I was playing around<br>[82:15] with trying to convert it, but I I mean<br>[82:18] like I'm already running into errors<br>[82:19] like okay, so these things aren't these<br>[82:21] don't have types. They may not be<br>[82:22] installed. Um, and so I know there's no<br>[82:26] types for blocks, which means that this<br>[82:28] thing will need to have a type. So I<br>[82:30] have to I have to generate a type of<br>[82:32] this. Now, I I could just generate the<br>[82:33] type that I need just for my use case<br>[82:36] and move on. Like I I could literally<br>[82:38] just create a type that has that stuff<br>[82:40] and that's it. And then and then I' I'<br>[82:43] I'd be done. Um and then like the rest<br>[82:46] of it like<br>[82:49] the the rest of it is fairly<br>[82:50] straightforward, I think. But I mean<br>[82:53] like I'm<br>[82:56] Yeah, I guess it depends on on what<br>[82:58] you're doing. And I I think I think some<br>[82:59] of these these things like I don't need<br>[83:01] like I I don't have all the stuff typed<br>[83:03] out yet. But it's<br>[83:06] you know it's mostly just React<br>[83:08] components and typing parameters and<br>[83:11] doing all that. I mean I think it's I<br>[83:13] don't know.<br>[83:15] I think it's a good so in my case where<br>[83:18] I think it would become super helpful is<br>[83:21] when I'm doing stuff like post meta<br>[83:23] query controls<br>[83:25] um like the query what what they like um<br>[83:32] what what am I trying to say here in my<br>[83:34] types I'm defining some types of like<br>[83:37] query props query attributes some of<br>[83:40] these queries are pretty big like<br>[83:43] there's a lot of props and a lot of<br>[83:44] things added and like my meta like when<br>[83:47] I when we're working with meta control<br>[83:50] um you can see there's like there's a<br>[83:52] list of queries and there's an an ID and<br>[83:55] I I have I have it defined here<br>[83:58] somewhere but I can't remember where it<br>[83:59] is but basically like it they're pretty<br>[84:01] complicated objects so having types in<br>[84:04] there would be very helpful because then<br>[84:06] I don't have to remember what all that<br>[84:08] stuff is but again it depends on what<br>[84:10] you're doing I think so I'm I'm going to<br>[84:12] take another shot at this I think I I<br>[84:14] did this kind of backwards, but<br>[84:17] um that's sort of sort of my idea.<br>[84:21] But yeah,<br>[84:21] >> I think I think that the core team of<br>[84:24] WordPress still needs to take a a<br>[84:27] decision on this because this this<br>[84:30] discussion reappears<br>[84:32] often.<br>[84:33] >> Yeah,<br>[84:34] >> it's I think I think the decision is new<br>[84:37] code is is written in in Typescript um<br>[84:40] as much as possible. Like if you were<br>[84:42] writing a new component, it'll be done<br>[84:44] in Typescript. Or if you're writing a<br>[84:45] new whatever, it it'll it's done in<br>[84:47] Typescript. The problem is we've got<br>[84:49] like I don't know what, five, six years<br>[84:51] of like non-Typescript code out there,<br>[84:53] right? Um Oh, Kevin's giving us<br>[84:58] all the code that we need to start our<br>[85:01] our um<br>[85:04] that's it. That's all we need according<br>[85:06] to Kevin. Perfect. Done. No more type No<br>[85:08] more TypeScript is needed. Uh um it's<br>[85:12] it's the old stuff. It's the but it's<br>[85:15] the fundamentals. That's the thing. Like<br>[85:17] the block a block doesn't have really a<br>[85:20] TypeScript definition. It it it has a<br>[85:22] definition. I don't know if it's been<br>[85:24] typed, you know, and then like all the<br>[85:27] attributes for all of that all of that<br>[85:28] stuff. Like that's what we don't really<br>[85:30] have available as a type um to be<br>[85:34] imported from a package. And I I think<br>[85:37] it's just like getting into the the<br>[85:39] weeds of DIT and just kind of working<br>[85:41] through it, right? So,<br>[85:45] block output attributes.<br>[85:50] >> Yeah, this stuff from Kevin looks pretty<br>[85:51] straightforward.<br>[85:53] >> Yeah. Well, you know, Kev's kind of a<br>[85:55] genius.<br>[85:57] Taught him everything he knows. I'm not<br>[85:59] gonna lie to you.<br>[86:03] I am lying to you.<br>[86:07] All right.<br>[86:09] >> I think I that might be my weekend. I<br>[86:10] might convert one of my plugins to<br>[86:12] TypeScript just to try it.<br>[86:14] >> Yeah, I I I really honestly I am like my<br>[86:18] New Year's resolution besides losing<br>[86:21] weight, which is everyone's New Year's<br>[86:23] resolution, is to uh have every single<br>[86:27] JavaScript I file that I create and work<br>[86:29] on be in Typescript.<br>[86:31] um because that's the only way that I'm<br>[86:34] going to get really good at Typescript<br>[86:35] and I think that is a skill set that I<br>[86:37] need um is to just it's just just to<br>[86:41] work with it and then I'll be able to<br>[86:43] identify the pain points that extenders<br>[86:44] have and then I'll be able to help<br>[86:46] address them. Right.<br>[86:47] >> Yeah, that was part of my problem with<br>[86:49] learning Typescript was just the<br>[86:50] frequency in which I was using it. For a<br>[86:52] while it was like every day for a couple<br>[86:54] months but then you know we switched<br>[86:56] gears and it was like more focused on<br>[86:57] the WordPress side like Gutenberg and it<br>[86:59] was we went really hardcore on that. So<br>[87:01] like for the better part of the last<br>[87:03] year I would say very consistently of my<br>[87:05] work and my personal work that I do it<br>[87:08] was really all focused on Gutenberg and<br>[87:09] React and and JavaScript and I hadn't<br>[87:11] really touched TypeScript. So like I<br>[87:13] would go back now and I'd probably have<br>[87:14] to go and do some sort of a<br>[87:17] course of some sort to just a refresher.<br>[87:20] >> Yeah. Yeah. That's exactly where I am.<br>[87:22] Like I I have this course and I I I I<br>[87:24] got through it uh like last year and<br>[87:26] then but like I don't touch t I I don't<br>[87:28] do a lot with TypeScript like very<br>[87:29] basics but the the level of TypeScript<br>[87:31] that I'm operating at like the types can<br>[87:34] be inferred by Typescript like you don't<br>[87:36] need me to like you know like it's it's<br>[87:39] a it's a string parameter like I don't<br>[87:41] think Typescript really can't figure<br>[87:43] that out right. So, so yeah, I think<br>[87:45] it's I think it's it's like anything.<br>[87:47] It's like if you want to get really good<br>[87:48] at something, you have to like you got<br>[87:50] to really do it. You got to just go and<br>[87:51] do it, dive into it. And this is going<br>[87:53] to be like a concerted effort for me to<br>[87:55] like,<br>[87:57] you know, only write stuff. So, I I I<br>[87:59] need a create block uh template, which I<br>[88:02] have somewhere that does TypeScript that<br>[88:04] takes everything and just puts it in<br>[88:05] Typescript because the cool thing about<br>[88:07] create block and the the scripts package<br>[88:09] is you don't need to have a TS config.<br>[88:11] it it just works which is really great<br>[88:14] because that's a big part too is is<br>[88:16] trying to figure out all the TS config<br>[88:18] stuff and like um you know the the only<br>[88:22] workflow I don't have is having uh the<br>[88:25] TypeScript watch running and this the<br>[88:28] start package but if you're in like an<br>[88:30] IDE you don't really need to have it<br>[88:32] watching to to do it I think and I think<br>[88:34] that's just my mindset was that like I'm<br>[88:36] used to like um having like a watch<br>[88:39] command that does all my linting and<br>[88:41] everything in there for me and the the<br>[88:44] IDE does it now. So, and that's probably<br>[88:46] just me having to like change the way I<br>[88:48] think of things, but<br>[88:50] you know, so<br>[88:54] >> the great part of it is that AI is doing<br>[88:57] great with typed uh languages.<br>[89:00] >> It really is. And I think I think it's<br>[89:01] going to help Gutenberg like very much<br>[89:04] like I I think once we start getting a<br>[89:06] lot more like TypeScript based code out<br>[89:09] in the world that is for blocks and for<br>[89:12] you know working with the UI and slot<br>[89:13] fills and all all of that stuff. Um I<br>[89:15] think AI is going to get better at at<br>[89:18] giving good examples right that's we'll<br>[89:22] see that probably have to train some new<br>[89:24] models.<br>[89:26] How terrifying is it that<br>[89:29] the answers that we all put on Stack<br>[89:31] Overflow are have now been ingested in<br>[89:34] into models?<br>[89:36] >> I'm I'm more afraid about the answers<br>[89:39] given to<br>[89:41] >> Yeah. Yeah. Exactly.<br>[89:42] >> I I'm afraid about those from<br>[89:45] >> the answer got Yeah. Yeah. Exactly.<br>[89:49] >> That's funny.<br>[89:50] >> The part that has been trained with<br>[89:52] Reddit is the problem, right?<br>[89:54] >> Oh my gosh. Exactly.<br>[89:58] Um, just want to do a shout out for<br>[90:01] anyone that's out that's just joined. We<br>[90:03] are doing live viewer callins. So, if<br>[90:05] you want to jump on stream with uh<br>[90:07] myself, Troy, and the love, come on in.<br>[90:09] All are welcome. Um,<br>[90:12] all you need is a Twitch account and one<br>[90:15] that's verified apparently. Um, yeah.<br>[90:18] So, come on in and you can chat<br>[90:21] TypeScript or whatever you want. Doesn't<br>[90:23] matter. We we can talk about whatever<br>[90:25] y'all want to talk about. Um, cool. All<br>[90:29] right. So, I have to figure out what<br>[90:32] Kevin was telling me about this. So,<br>[90:33] this is a very generic thing. So,<br>[90:37] um,<br>[90:40] blocks take this object.<br>[90:43] So, should I do like<br>[90:47] maybe I need to define a type that looks<br>[90:49] like uh, what are we going to call this?<br>[90:51] Attributes.<br>[90:56] attributes attributes,<br>[90:59] right? And then it it you can do like<br>[91:01] the key is going to be<br>[91:04] a string, right? Because we don't know<br>[91:06] what it is. And this will be a string.<br>[91:10] No, this will be this is going to be<br>[91:13] an object.<br>[91:17] I forget how to do this now.<br>[91:22] How do you How do you do the dynamic? Ah<br>[91:24] crap. I used to remember how Whoa. What<br>[91:27] was that?<br>[91:38] I have to look this up. How you do?<br>[91:43] Let's Let's go to my course. Where's<br>[91:44] that course I have here? That's not it.<br>[91:46] That's not it. That's not Where' it go?<br>[91:49] Whatever. Okay. TS dynamic<br>[91:53] uh keys<br>[92:00] key string thing objects something like<br>[92:03] that. Does it have to be an interface to<br>[92:05] do that? No. So like this.<br>[92:09] That's another array of objects though.<br>[92:11] So that's what it would look like. And<br>[92:13] then<br>[92:17] um<br>[92:26] trying to figure this out. Okay, so this<br>[92:28] the name of our attribute is going to be<br>[92:30] a string. It always is. And then this is<br>[92:31] going to be an object and it's going to<br>[92:33] have it'll have a type<br>[92:37] which is going to be string.<br>[92:40] Right? What was that?<br>[92:45] heard a little like poker music or<br>[92:46] something there. That was great.<br>[92:48] >> That was my son. I I gotta tell him to<br>[92:50] turn down the volume. My son is home<br>[92:51] today and he's listening. He's watching<br>[92:53] Spongebob.<br>[92:54] >> Oh, that's cool. He can watch He Tell<br>[92:56] him to turn it up. I I love Spongebob.<br>[92:58] Okay, so the type is a string, right?<br>[93:01] And then what are the other what are the<br>[93:03] other things that we can put into a an<br>[93:05] attribute for a block? We got type is<br>[93:07] what? uh default<br>[93:11] and<br>[93:14] right and then what else?<br>[93:18] Oh, all this stuff. Okay, I'm not using<br>[93:21] any of that. So, I should just be able<br>[93:22] to do something like this, right? So<br>[93:27] now,<br>[93:33] how do I how do I indicate that this is<br>[93:37] an object that contains multiple of<br>[93:39] these?<br>[93:42] Does anyone know off the top of your<br>[93:44] head? I don't know how to do that.<br>[93:49] Oh, Kev Kev's in the chat. He'll tell me<br>[93:51] what to do. So, this is telling it that<br>[93:53] it's it's going to be uh it's going to<br>[93:55] be have a have a key and it's an object<br>[93:58] that has a type and a string in it. And<br>[94:00] then but I want to be able to tell the<br>[94:02] attributes might have multiples of of<br>[94:04] these. So, is there like a<br>[94:09] is there a way of doing that? Okay. Um I<br>[94:13] guess I'll Google it. Oh, you know what?<br>[94:15] Let's ask Chlo um how can I indicate<br>[94:21] that this uh type<br>[94:25] can have<br>[94:28] uh more<br>[94:30] entries or does it automatically be<br>[94:32] inferred? It already does. So that's<br>[94:36] just saying<br>[94:38] okay. So that's unlimited. Okay.<br>[94:40] >> But you want<br>[94:46] I was asking if you want if you want<br>[94:47] multiple levels deeper. Do you want the<br>[94:50] object to be deeper and want define it<br>[94:52] this way?<br>[94:52] >> No, I just want the object to be able to<br>[94:54] be a series of strings followed by so so<br>[94:57] basically follow this. So attributes is<br>[94:59] is is going to be an object and that<br>[95:01] contains a key which is a string and<br>[95:03] inside of that it's an object that that<br>[95:05] has a type type and it's of the the type<br>[95:09] string as well. So that should be what<br>[95:11] this is doing. So, if I pass this to<br>[95:13] here, is that going to do what I want it<br>[95:16] to do?<br>[95:18] Let's see.<br>[95:20] It seems seems to be<br>[95:24] that's not yelling me. Let's restart the<br>[95:26] TypeScript server. Did that actually do<br>[95:29] that? No.<br>[95:34] Oh, did I just did that just do what I<br>[95:37] wanted it to do? Amazing.<br>[95:40] Now, let's let's let's test it and we'll<br>[95:42] say<br>[95:44] number. I don't know if that's going to<br>[95:46] yell at me or not. Is there a block<br>[95:47] type? Probably you probably just No,<br>[95:49] there isn't a block type. I haven't<br>[95:50] defined one. Ask that doesn't seem to be<br>[95:52] doing any Oh, wait. Hold on. Probably<br>[95:55] has attributes. Let's see.<br>[96:05] >> All right. Well, it's not yelling at me,<br>[96:08] so<br>[96:09] That's going to be I guess what it needs<br>[96:12] to be.<br>[96:18] I guess I I can just pass this straight<br>[96:19] into here too, right? I can just do<br>[96:22] something like that.<br>[96:27] >> I should probably define a block type,<br>[96:28] but I I don't have one defined and I<br>[96:31] don't know if there is one defined in<br>[96:32] here.<br>[96:34] But Kev, this seems like it's the right<br>[96:36] way of doing this, right?<br>[96:42] >> I don't know.<br>[96:43] >> In your type definition, you're you're<br>[96:46] setting your type, right? Do you do you<br>[96:47] not have to put in other stuff inside of<br>[96:49] there?<br>[96:51] >> Where's that?<br>[96:52] >> I'm just looking. If you go back to<br>[96:54] where you're you're defining the type,<br>[96:56] >> which which type? Sorry.<br>[96:59] >> The um your block attributes definition,<br>[97:02] I think it was. Oh yeah, right here.<br>[97:06] >> I'm going to put that in in into its own<br>[97:09] type.<br>[97:09] >> Oh yeah. Okay, you did right there.<br>[97:10] Okay, because inside of there, wouldn't<br>[97:12] you put like uh you know, say if one of<br>[97:14] your attributes was URL, wouldn't you<br>[97:16] put URL equals URL or I guess<br>[97:19] >> Well, yeah. Yes, you could. But I think<br>[97:22] that that'll become a a pain because if<br>[97:27] so if if I do it this way like URL like<br>[97:31] um<br>[97:34] like this then this this is going to<br>[97:36] expect Why is it yelling at me?<br>[97:40] >> Oh uh<br>[97:43] it's a string.<br>[97:45] Uh<br>[97:47] what the problem here is is is that I<br>[97:50] need to have URL in every single usage<br>[97:53] of<br>[97:54] >> wouldn't you put URL like underneath<br>[97:57] type because you're going to define<br>[97:58] types of your type there could be string<br>[98:00] it could be number it could be array<br>[98:02] like you could you could pipe a bunch of<br>[98:04] those in and have a bunch of different<br>[98:05] types in there but then inside of there<br>[98:07] wouldn't your attributes come underneath<br>[98:09] it and you define so you know say if you<br>[98:11] have a source URL and it's uh you know<br>[98:13] it's a string<br>[98:14] >> oh I see what you're Yeah. Yeah. Yeah.<br>[98:16] Okay. I see what you're saying. So, this<br>[98:18] this this is too too generic. Like, it<br>[98:21] should be because the types are actually<br>[98:23] going to be the word string or the word<br>[98:27] number. Like, is that what you mean?<br>[98:29] >> Yes.<br>[98:29] >> The word boolean<br>[98:33] uh and then I guess it'll be array. I<br>[98:38] think that's it. Yeah, that's that that<br>[98:40] would be better because the type can can<br>[98:44] be like it can be any one of these,<br>[98:47] right?<br>[98:49] Number object. Oh god, there's a ton.<br>[98:52] Um, so it needs to be one of these<br>[98:55] options, not just a string because I<br>[98:57] guess technically if I just type it as a<br>[98:59] string, it could just be that and that<br>[99:00] that that will be correct,<br>[99:02] >> but it's like it that'll be correct from<br>[99:05] a type point of view, but that won't be<br>[99:06] what we want, right?<br>[99:09] So<br>[99:12] yeah, is that what you're That's what<br>[99:13] you're asking me, right? See, this is<br>[99:14] the kind of stuff that I, you know, I<br>[99:16] have to get better at. So this this<br>[99:18] makes more sense.<br>[99:20] >> It's interesting. I I've taken a few<br>[99:22] screenshots of what you're sharing and<br>[99:24] I'm running through chat as well and<br>[99:26] just trying to trying to wrap my head<br>[99:27] around it as well.<br>[99:28] >> No, this is great. I I mean, this is<br>[99:31] more correct because we we this type<br>[99:34] needs to be of the the type string,<br>[99:36] right? or number. And I wonder if I can<br>[99:39] test that if by putting something in. So<br>[99:42] in here I've got no where is it? I had<br>[99:46] to close the wrong one.<br>[99:49] Pardon me. Sorry over there. Not that<br>[99:51] one. Um<br>[99:54] okay, we'll use this one.<br>[99:57] Not that one. This one. So in here we<br>[100:00] we've got this. So if I pass this as a<br>[100:05] um<br>[100:13] is that going to work? Like I don't<br>[100:14] know. That doesn't seem right.<br>[100:18] No, that is right. The value of that is<br>[100:21] a string. Okay.<br>[100:25] Am I overthinking this?<br>[100:28] Because the other thing that doesn't um<br>[100:31] well that is basically what the block<br>[100:32] attributes look like and this is going<br>[100:34] to be uh there is a<br>[100:38] default<br>[100:41] and the default is going to be a string<br>[100:43] as well.<br>[100:47] Right. I wonder if I get I don't get any<br>[100:49] errors though<br>[100:53] because I'm not The thing is it's not<br>[100:56] it's not arrowing like I feel like this<br>[101:01] that matches the example that the first<br>[101:03] answer on AI gave me here.<br>[101:06] >> Yeah. like<br>[101:09] we we<br>[101:13] >> oh we're we're we're um J2 trumpet we<br>[101:15] are fighting around with um uh with with<br>[101:19] TypeScript. Now the the thing is here<br>[101:21] that by passing the this block<br>[101:24] attributes<br>[101:26] this isn't oh hold on hold on<br>[101:31] I'm not thinking of this correctly<br>[101:33] because<br>[101:35] the block attributes that get passed to<br>[101:37] here<br>[101:42] don't have anything to do with this<br>[101:44] block JSON like this type doesn't<br>[101:46] necessarily matter. I'm not validating<br>[101:48] this. I'm validating what's coming in to<br>[101:52] the the edit<br>[101:58] because it's not an object that comes<br>[102:00] in, it's a value.<br>[102:04] You know what I'm saying? Does that make<br>[102:06] sense? So like in your edit, this<br>[102:09] doesn't come in as like like this is<br>[102:12] just a value.<br>[102:17] So attributes is going to be<br>[102:20] it should be more like this. So whatever<br>[102:23] the key is it's going to be just a<br>[102:25] simple value<br>[102:31] that looks that I think that's more<br>[102:33] accurate.<br>[102:37] I keep looking at at at you guys like<br>[102:39] yeah is that right? Because this is just<br>[102:41] literally going to be the value of<br>[102:43] whatever the block attribute is.<br>[102:45] right in here because when when<br>[102:48] attributes get passed to the edit or the<br>[102:50] save component, they don't they don't<br>[102:52] like we don't know what kind of type<br>[102:53] they are. That's not passed as<br>[102:55] information. It's just the value is is<br>[102:57] passed and I'm pretty sure they're<br>[103:00] always it's always passed as a string.<br>[103:04] >> Yeah, I think that that's true. Uh yeah,<br>[103:07] it's simply a way to tell the ID that<br>[103:10] hey the value that comes here in this it<br>[103:13] will be a string<br>[103:15] >> and that's how you delete it in in that<br>[103:19] function.<br>[103:21] >> Okay. So block attributes gets passed to<br>[103:23] edit. So in my edits see it's weird<br>[103:25] because these this this should be<br>[103:27] erroring shouldn't it?<br>[103:34] block attributes.<br>[103:48] Now I'm trying to like break TypeScript.<br>[103:50] It's not working. So this this feels<br>[103:53] weird to me because this attributes is<br>[103:55] being passed into my edit and the edit.<br>[103:58] So this is defining these attributes as<br>[103:59] as being some kind of key defi um which<br>[104:04] is a string followed by a num a number.<br>[104:07] So the value of whatever this is should<br>[104:09] be a number. But in my where I'm<br>[104:11] actually implementing this here I'm<br>[104:13] defining my block attributes as four<br>[104:17] strings. They're in here as strings. But<br>[104:19] this this should be yelling at me.<br>[104:22] Should it not? I think it should yell at<br>[104:25] you in execution like when you are<br>[104:28] trying to load that in in the browser<br>[104:31] because<br>[104:33] >> I'm not sure<br>[104:33] >> TypeScript error though, right? Like<br>[104:35] it's it should be<br>[104:38] >> I don't know if if Typescript can know<br>[104:40] if that returned value from the edit<br>[104:43] function is on<br>[104:46] >> Oh, I see what you're saying. on the<br>[104:48] same structure like<br>[104:50] >> but I I bet that when you will execute<br>[104:53] that code it will error out it will see<br>[104:55] that it's a string is not a number and<br>[104:58] it will<br>[104:59] >> really okay let's let's let's check that<br>[105:04] let's see do I have this I do close<br>[105:09] uh this one<br>[105:13] inspect console<br>[105:18] Maybe<br>[105:21] that.<br>[105:26] Okay. So, that's that's not doing<br>[105:28] anything. Okay. Well, I mean, it's not I<br>[105:31] don't know. Whatever. This is the kind<br>[105:33] of stuff that makes me like less and I<br>[105:36] just don't know what I'm doing. But<br>[105:39] like this feels like somewhere along the<br>[105:42] lines this should know that um what's<br>[105:45] being passed because I'm I'm defining my<br>[105:48] block at attributes as a type and I'm p<br>[105:51] I'm passing it here and so so this like<br>[105:54] where where is this?<br>[105:56] Oh. Oh, you know why? I think I need to<br>[106:06] I think I might need to import that.<br>[106:12] Um I need to change the the name of<br>[106:16] this. Um<br>[106:20] attributes.<br>[106:24] So this this should be typed as should<br>[106:26] be typed is how do I type that like<br>[106:28] this?<br>[106:32] All right.<br>[106:40] I need to pass the speed.<br>[107:06] I think that just needs to be passed in<br>[107:07] there, doesn't it? All<br>[107:15] right, I'm gonna have to jump out, Ryan.<br>[107:17] >> My lunch my lunch break is over.<br>[107:20] >> Okay. Well, thanks for hanging out.<br>[107:22] Sorry, this has just been you looking at<br>[107:24] my TypeScript code. Shouldn't need to.<br>[107:27] What are you stuck on? Oh, Kevin, I'm<br>[107:29] stuck on everything. I'm stuck on.<br>[107:32] >> All right. Thanks, Troy. Thanks for<br>[107:33] hanging out.<br>[107:34] >> See you, bro.<br>[107:36] >> All right. So, I'm just uh unsure why<br>[107:39] this isn't erroring for me, but this<br>[107:41] feels more accurate<br>[107:44] um from a type point of view, but I'm<br>[107:47] not going to get too hung up on it. And<br>[107:48] it's it's afternoon and anyway, so I<br>[107:51] think I might call it. Um thanks for<br>[107:56] hanging out with me. The luck, your last<br>[107:57] man standing. And anything you want to<br>[107:59] say before before we jump up?<br>[108:02] >> No, no. Have a great day. See you all.<br>[108:04] Mhm. Well, thanks for hanging out.<br>[108:07] Thanks for jumping on. Um, next week,<br>[108:09] Kevin, your turning. You got to get on<br>[108:12] here. Um, yeah. Cool. Awesome. Well,<br>[108:14] thanks everyone for hanging out with me<br>[108:16] today and, uh, help me fight through<br>[108:18] some some TypeScript stuff. Great<br>[108:19] conversation about TypeScript.<br>[108:21] TypeScript. Yeah, I should definitely do<br>[108:23] that. Um, cool. Awesome. Well, thanks<br>[108:26] guys and gals and everyone hanging out<br>[108:28] with me today. I I will see you next<br>[108:29] week. You're the best.<br>[108:31] Talk to you all later. <!-- deep-read:sections end --> ## ๐Ÿ“บ Video ![](https://www.youtube.com/watch?v=S7iz-lSkoh8) --- # ๐Ÿ“ Full Notes (Deep-Read Analysis) # ๐Ÿท๏ธ Title: Inviting anyone to join my stream? What could go wrong?! ## ๐Ÿงฐ Action Inbox - [H1] Experiment with Twitch viewer call-ins โ€” first-time feature test #streaming - [H2] Work on TypeScript block development โ€” learning process documentation #typescript - [H3] Review WP Rig plugin feedback โ€” promised community response #wordpress ## ๐Ÿงญ Table of Contents - [๐Ÿ“ Summary](#-summary) - [๐Ÿ“– Main Content](#-main-content) - [๐Ÿ—’๏ธ Notes](#๏ธ-notes) - [๐Ÿ“š References](#-references) - [๐Ÿ—ฃ๏ธ Paraphrase](#๏ธ-paraphrase) - [๐Ÿ“ฐ Newsletter](#-newsletter) - [โœ… Action Items](#-action-items) - [๐Ÿงช Hypotheses](#-hypotheses) - [๐Ÿ“Š Methodology](#-methodology) - [โ“ Questions](#-questions) - [๐Ÿ”ฎ Future Research](#-future-research) - [๐Ÿ’ก Implications](#-implications) - [๐Ÿง  Learning Styles Assessment](#-learning-styles-assessment) - [๐Ÿ“Š Accessibility Assessment](#-accessibility-assessment) - [๐ŸŒ DEIB Assessment](#-deib-assessment) - [โœ… Logical Validity](#-logical-validity) - [๐Ÿ›ก๏ธ DARVO Analysis](#-darvo-analysis) - [๐ŸŽฏ Conclusion](#-conclusion) ### ๐Ÿ”— References - [WP Rig Plugin](https://github.com/wprig/wprig) - [Totally TypeScript Course](https://totaltypescript.com) ## ๐Ÿ“ Summary - Ryan Welcher experiments with Twitch viewer call-ins on his first 2026 stream - Multiple community members join to discuss WordPress development and TypeScript integration - Paul Baron shares a plugin proposal for managing code snippets with security considerations - Live coding session demonstrates TypeScript implementation challenges in WordPress blocks - Community discussion covers caching solutions, plugin development, and WordPress core TypeScript adoption ## ๐Ÿ“– Main Content This stream represents an experimental format where viewers can directly join the broadcast through Twitch's call-in feature. The session covers multiple WordPress development topics while demonstrating the technical and social dynamics of live collaborative streaming. The main technical focus involves implementing TypeScript in WordPress block development, addressing the lack of proper types in core packages. Ryan works through creating custom type declarations and demonstrates common challenges developers face when migrating to TypeScript. Paul Baron presents a plugin concept for managing code snippets with dynamic settings pages, raising important security considerations around arbitrary code execution. The discussion highlights the balance between functionality and security in WordPress plugin development. ## ๐Ÿ—’๏ธ Notes #### โฑ๏ธ [00:00](https://youtu.be/S7iz-lSkoh8?t=0) โ€” [H1] Stream Setup and Viewer Call-ins Introduction - Key idea: Testing Twitch viewer call-in feature for interactive streaming - Evidence: "There's this thing in Twitch called viewer calling. People can actually jump up." #### โฑ๏ธ [02:30](https://youtu.be/S7iz-lSkoh8?t=150) โ€” [H2] 2026 Goals and TypeScript Focus - Key idea: Dedicating 2026 to learning TypeScript for WordPress development - Evidence: "2026 for me is going to be the year of Typescript. I'm going to learn it. I'm going to work with it in every project." #### โฑ๏ธ [05:45](https://youtu.be/S7iz-lSkoh8?t=345) โ€” [H2] Community Poll Results Discussion - Key idea: Audience split between JavaScript and TypeScript content preferences - Evidence: "It's still 50/50. I should have taken this. Why not both out?" #### โฑ๏ธ [08:20](https://youtu.be/S7iz-lSkoh8?t=500) โ€” [H2] React and WordPress Block Development Resources - Key idea: Recommending learning path for React in WordPress context - Evidence: "I would learn a little bit of React for sure... go to somewhere like the block editor handbook" #### โฑ๏ธ [12:15](https://youtu.be/S7iz-lSkoh8?t=735) โ€” [H2] WP Rig Plugin Discussion - Key idea: Community member seeking feedback on WP Rig's block building system - Evidence: "WP rig now has a block building system in it based on create block" #### โฑ๏ธ [15:30](https://youtu.be/S7iz-lSkoh8?t=930) โ€” [H1] Paul Baron Joins Stream - Key idea: First successful viewer call-in with audio/video setup - Evidence: "Paul, are are you there, sir? Okay, I can see you, Paul, but I can't hear you." #### โฑ๏ธ [18:45](https://youtu.be/S7iz-lSkoh8?t=1125) โ€” [H1] Code Snippet Management Plugin Proposal - Key idea: Paul presents plugin for managing code snippets with security considerations - Evidence: "Managing insertion of code snippets... we split it up and you know we can actually control what is" #### โฑ๏ธ [25:10](https://youtu.be/S7iz-lSkoh8?t=1510) โ€” [H2] Security Concerns in Snippet Management - Key idea: Discussing risks of arbitrary code execution in WordPress plugins - Evidence: "What would keep somebody from putting a two some script tags with some malicious code in there?" #### โฑ๏ธ [28:30](https://youtu.be/S7iz-lSkoh8?t=1710) โ€” [H2] Troy Joins for Caching Discussion - Key idea: Second viewer joins to discuss server optimization and caching - Evidence: "We were just looking at implementing uh Surge on our servers just to get some some better full page caching" #### โฑ๏ธ [32:45](https://youtu.be/S7iz-lSkoh8?t=1965) โ€” [H2] Nonce Caching Problems Solution - Key idea: Addressing nonce expiration in cached forms using JavaScript - Evidence: "Load the page and then run JavaScript immediately to update portions of the page that need to be updated" #### โฑ๏ธ [38:20](https://youtu.be/S7iz-lSkoh8?t=2300) โ€” [H1] TypeScript Implementation Challenges - Key idea: Demonstrating custom type declarations for WordPress blocks - Evidence: "In WordPress for example in our blocks package there's no proper types" #### โฑ๏ธ [42:15](https://youtu.be/S7iz-lSkoh8?t=2535) โ€” [H2] Totally TypeScript Course Review - Key idea: Learning TypeScript through structured online course - Evidence: "I'm taking this course... Totally TypeScript by Matt PCO" #### โฑ๏ธ [45:50](https://youtu.be/S7iz-lSkoh8?t=2750) โ€” [H1] WordPress Core TypeScript Integration Discussion - Key idea: Plans for adding TypeScript support to WordPress core packages - Evidence: "I think we need it. I'm actually working on helping to get that done" #### โฑ๏ธ [52:30](https://youtu.be/S7iz-lSkoh8?t=3150) โ€” [H2] Community Perspectives on TypeScript Adoption - Key idea: Discussing community division on TypeScript in WordPress - Evidence: "There are Typescript enthusiasts... then there's this other side from Twitter that's oh no... they're following butterflies" ## ๐Ÿ“š References - [WP Rig GitHub Repository](https://github.com/wprig/wprig) - [Block Editor Handbook](https://developer.wordpress.org/block-editor/) - [Totally TypeScript Course](https://totaltypescript.com) - [WordPress Core TypeScript PR](https://github.com/WordPress/gutenberg/pull/[MISSING]) ## ๐Ÿ—ฃ๏ธ Paraphrase - Ryan experiments with interactive streaming by allowing viewers to join via Twitch call-ins, creating a collaborative development environment - The technical discussion centers on implementing TypeScript in WordPress block development, addressing missing type definitions in core packages - Community members present various plugin concepts and development challenges, highlighting the collaborative nature of WordPress development ## ๐Ÿ“ฐ Newsletter **Interactive WordPress Development: Exploring TypeScript and Community Collaboration** This week's stream showcased an experimental approach to developer education through interactive broadcasting. The combination of live coding, community participation, and real-time problem-solving demonstrates new possibilities for WordPress developer engagement. Key highlights include practical TypeScript implementation strategies for WordPress blocks and community-driven plugin development discussions. The interactive format allowed for immediate feedback and collaborative problem-solving. **Practical Applications:** - TypeScript integration strategies for WordPress development - Security considerations in plugin development - Caching solutions for dynamic content Resources: [Learn WordPress](https://learn.wordpress.org/), [Block Editor Handbook](https://developer.wordpress.org/block-editor/), [TypeScript Handbook](https://www.typescriptlang.org/docs/) ## โœ… Action Items #### DevRel - Developer advocacy: Document TypeScript adoption patterns for WordPress community - Education: Create TypeScript learning path for WordPress developers - Developer experience: Address missing types in WordPress core packages - Community management: Facilitate interactive streaming for developer engagement #### WordPress - Core: Progress TypeScript integration in block packages - Core Performance: Address caching challenges with dynamic content - Community: Support interactive formats for developer education - Documentation: Create TypeScript migration guides for plugin developers - Plugins: Establish security guidelines for code snippet management plugins #### Community - Contributors: Engage in TypeScript adoption discussions - Ecosystem: Balance innovation with backward compatibility concerns ## ๐Ÿงช Hypotheses - Interactive streaming formats increase community engagement and learning outcomes - TypeScript adoption in WordPress core will improve developer experience without fragmenting the community - Security-conscious plugin development requires balancing functionality with safety measures - Real-time collaborative problem-solving accelerates learning for participants and viewers ### ๐Ÿ“Š Methodology - A/B testing of traditional vs interactive streaming formats for engagement metrics - Survey WordPress developers on TypeScript adoption barriers and benefits - Security analysis of code snippet management approaches in WordPress plugins ### โ“ Questions - How can WordPress balance TypeScript adoption with accessibility for new developers? - What security frameworks should guide plugin development for code management features? - How do interactive streaming formats compare to traditional documentation for developer education? ### ๐Ÿ”ฎ Future Research - Long-term impact of TypeScript adoption on WordPress plugin ecosystem - Effectiveness of interactive streaming for technical education - Community response patterns to major technological shifts in open source projects ### ๐Ÿ’ก Implications - Practice: Developers need strategies for gradual TypeScript adoption in existing projects - Policy: WordPress core needs clear guidelines for TypeScript integration timeline - Security: Code snippet management plugins require rigorous security review processes - Education: Interactive formats may supplement traditional documentation effectively - Community: Technology adoption discussions benefit from inclusive dialogue approaches ### ๐Ÿง  Learning Styles Assessment Reading level estimate: 12th grade (technical content with accessible explanations) #### ๐Ÿ‘€ Visual learners - Present: Live coding demonstrations, plugin interface mockups - Improve: Architecture diagrams for TypeScript integration, visual security flow charts #### ๐Ÿ”Š Aural learners - Present: Live discussion, verbal explanations of concepts - Improve: Structured audio segments explaining key concepts #### ๐Ÿ—ฃ๏ธ Verbal learners - Present: Interactive Q&A, definition of technical terms - Improve: Glossary of TypeScript terms for WordPress context #### ๐Ÿงฉ Kinesthetic learners - Present: Live coding exercises, hands-on problem solving - Improve: Step-by-step TypeScript migration guides, interactive tutorials #### ๐Ÿง  Logical learners - Present: Problem-solving sequences, technical decision trees - Improve: Flowcharts for TypeScript adoption process, security decision matrices #### ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ Social learners - Present: Community discussion, viewer call-ins, collaborative problem solving - Improve: Structured peer review processes, group learning challenges #### ๐Ÿง˜โ€โ™€๏ธ Solitary learners - Present: Individual coding challenges, self-paced course references - Improve: Personal reflection prompts, self-assessment tools #### ๐ŸŒฟ Naturalistic learners - Present: Evolution of technology adoption patterns - Improve: Ecosystem thinking about WordPress development environment ### ๐Ÿ“Š Accessibility Assessment #### Screen reader semantics - Present: Live verbal descriptions of visual code elements - Improve: Alt text for code snippets, descriptive variable naming #### Keyboard navigation - Present: Live coding demonstrates keyboard-focused development - Improve: Keyboard shortcut documentation, navigation guides #### Contrast and readability - Present: High contrast code editor themes - Improve: Consistent color coding standards, readability guidelines #### Media and captions - Present: Live audio discussion with multiple speakers - Improve: Auto-generated captions, transcript availability ### ๐ŸŒ DEIB Assessment #### Cultural breadth - Present: Global community participation through streaming platform - Improve: Multi-timezone considerations, international case studies #### Inclusive language - Present: Technical discussions using accessible terminology - Improve: Avoiding insider jargon, defining technical terms consistently #### Neurodiversity support - Present: Multiple input methods (audio, visual, text chat) - Improve: Structured agendas, clear topic transitions #### Representation - Present: Multiple community members contributing expertise - Improve: Diverse technical perspectives, inclusive participation guidelines ### โœ… Logical Validity #### Strong reasoning - Deductive strength: TypeScript benefits identified through specific WordPress development challenges - Inductive strength: Community patterns extrapolated from individual developer experiences - Causal reasoning: Security concerns linked to specific plugin functionality risks - Analogical strength: Comparing WordPress TypeScript adoption to other framework migrations #### Fallacies - Appeal to novelty: Assumption that newer technology (TypeScript) is inherently better - False dichotomy: Framing TypeScript adoption as all-or-nothing decision #### Tone of voice - Overall tone: Collaborative and experimental, encouraging community participation while acknowledging technical challenges ### ๐Ÿ›ก๏ธ DARVO Analysis - Deny: No denial patterns observed - Attack: No attack patterns observed - Reverse victim/offender: No reversal patterns observed - Emotional cues and rhetoric: Positive, collaborative tone focused on learning and community building ## ๐ŸŽฏ Conclusion This experimental stream format demonstrates the potential for interactive developer education within the WordPress community. The combination of live coding, community participation, and real-time problem-solving creates engaging learning opportunities while addressing practical development challenges. The TypeScript discussion highlights the ongoing evolution of WordPress development practices, balancing innovation with accessibility. The security considerations raised around plugin development underscore the importance of careful design in extending WordPress functionality. Moving forward, interactive formats like this could supplement traditional documentation and conferences, providing more accessible ways for community members to participate in technical discussions and collaborative problem-solving. ## ๐Ÿงฑ Refactor Appendix ### ๐Ÿ“š Literature Split Pad Purpose: Stage CEE units that become Literature notes. Split level: H3 ### [H1] Interactive streaming improves developer community engagement > [!quote] [Inviting anyone to join my stream? What could go wrong?!](https://www.youtube.com/watch?v=S7iz-lSkoh8) by [[Ryan Welcher]] via [[Twitch]]. Published 2026-01-01. Accessed 2025-01-15. > "This is the first time I set this up, so this is fun. But I want to make sure that you can actually hear what Paul's saying" Demonstrates experimental approach to developer education through real-time collaboration. [view highlight](https://youtu.be/S7iz-lSkoh8?t=930#H1) #xref #streaming ID:rw_001 ### [H2] TypeScript adoption requires gradual integration strategy > [!quote] [Inviting anyone to join my stream? What could go wrong?!](https://www.youtube.com/watch?v=S7iz-lSkoh8) > "I think we need to get the types in in there first, get in and get that passing and then starting to add these types to the codebase" Shows practical approach to large-scale technical migrations in open source projects. [view highlight](https://youtu.be/S7iz-lSkoh8?t=2750#H2) #xref #typescript ID:rw_002 --- ### ๐Ÿ”– Atomic Split Pad (Zettel Candidates) Purpose: Promote reusable claims into Atomic notes. Split level: H4 #### [Z1] Security concerns scale with plugin --- # ๐Ÿ“„ Full Transcript *Auto-generated from YouTube captions ยท timestamps roughly every 30 seconds ยท [watch on YouTube](https://www.youtube.com/watch?v=S7iz-lSkoh8)* **[05:06]** Hi everyone. How's it going today? Welcome to the first game. I don't know watching right now. Cool. If you were all right, if you're here, say hi. Um, I'm trying something new. Trying something new today, which I don't know if this is going to work out. There's this thing in Twitch called viewer calling. People can actually jump up. **[05:40]** You know what? It's really hard to hear me when my microphone's way over there, I'd imagine. I don't know what I'm talking about. Okay. Do I have audio? Let's check. Hello. Check one, two. Check one, two. There we go. All right. So, anyways, as I was saying before, um, today is first stream of 2026. Pretty excited to be back. Had a great holiday. Um, and I uh I'm doing something new. I might do this every week. We're going to see how it goes today. Very Is the audio still very soft on **[06:11]** your side? I I uh realized my my microphone is really really really far away from my face there. So, it's probably what it was. But audio should be pretty crispy now. [snorts] Um, let me know if There we go. Kev XP, how's it going? Oh, you know what? I I didn't do didn't connect my Firebot. [snorts] There we go. That's why I can't see anybody. Okay, so Kevin, you're not going to get the shout out because my **[06:42]** Firebot wasn't connected. Yeah, thanks. Thanks, Techies Review. Uh, appreciate that. Um, I had my microphone in the wrong place. Oh, there's my dog barking. You can hear him. There he is. So, um, anyways, there's this thing in Twitch called viewer call-ins where if you have a tw a Twitch account, I think you have to be phone enabled, uh, you can call in and we can chat. So, if you're ruined your night Oh, it is night. Well, Kevin, why don't you just jump on the old Twitch account and come on in to **[07:14]** your >> There it is. I turned the thing on and then it realized that you chatted. So, there you go. There's a shout out for Kev XP. Um, [sighs] nice. You can sleep [snorts] tonight. Oh, you can't sleep tonight until you do a viewer call in. Kevin, go get on your Twitch channel. I know you got one and a microphone and do a call in and you can come on the stream with me. You can talk. Call in. Do Yes, we'll **[07:45]** debate whatever you want to debate. Typescript. You can tell me what I'm doing wrong with Typescript. Uh 2026 for me for me is going to be the year of Typescript. I'm going to learn it. I'm going to work with it in every project. Um and it's going to be fun. [laughter] That's my plan. So yeah, tell me C. Actually, Kevin, if you're interested, jump on. What's the vote count? The vote count. Oh, did you were Were you the one that voted or two that **[08:16]** voted? Let's see. Let's take a look here. Uh where are my posts? The vote count right now is sitting at two votes. One for JavaScript. If you haven't I I would love um some uh you were first. Nice. Well, Kevin, you are first in my heart as well. So, that is the the the poll to my YouTube account that I just I'm just trying to get an idea of what people want to see on my um channel here. So if **[08:48]** you're interested, please hit that link and go tell me what you want to see. If there's something that's not on like it's very generic. It's like do you want JavaScript now? Who? Yeah. Well, I know I know which which vote yours was, Kev. [laughter] U JavaScript, TypeScript, PHP focused stuff. I was thinking, you know what, there's a lot of a lot of knowledge out there and WordPress that um um people who've maybe been around for a while. I'm I'm not the other one. I didn't vote. Um **[09:21]** already know. So like oh tech techies review also curious to start learning about React and WP just like PHP in the good old days. What would be your go-to sources? Um this is a good question from uh although I can't highlight it. It's in um it's in YouTube uh techies review. You're more than welcome to just stay over there in YouTube but the chat mostly happens in in Twitch. So if you're interested come on over. But the question is, curious to start learning React WP, just like PHP in the good old days. What would you what would be your go-to sources? Well, I would learn a **[09:52]** little bit of React for sure. If you're not familiar with React at all, you there's a million courses out there just to get up to speed on React. And after that, I would probably go to somewhere like the block editor handbook and like the getting started guide. So this is going to teach you the the fundamentals of block de uh uh development which is kind of where the majority of um JavaScript development is happening inside of WordPress. Um, so this is a a good place to go get started and you **[10:23]** could just uh you know the other thing is you can just hang out here. Just uh subscribe to my channel, [laughter] follow me on Twitch and Twitter and wherever and we'll talk about stuff because this is what we do here is we talk about WordPress and uh and React, JavaScript and React and stuff like well not so much React more like how WordPress react and JavaScript all kind of intersect. That's sort of the idea behind it. Um, Kevin, I still don't see you in my callins. **[10:53]** Anyways, um, yeah. All right. So, let's let me refresh this. You six votes. Oh my god. Are you kidding me? It's still 50/50. I should have taken this. Why not both out? I should have done that a little bit different. [snorts] Um, so lots of people want to see JavaScript type crypt. More people want to see both. So that doesn't help me at all. It's my own fault. All right. Well, speaking of Typescript. Ah, thanks Techiey's review. Appreciate **[11:24]** that very much. Um, I do have combined chat. Uh, but some of my chat I I can't I I would highlight your your question on the stream, but I only get uh chat coming in um from um Twitch in there. WP rig now has a block building system in it based on create block. Curious about your thoughts on it. H Arbog 17. **[11:56]** WP rig. Why does that sound super familiar to me? I think I know. What is WP rig? Let's take a look. Wait a minute. Is there get up for this? **[12:43]** Where's the repository? Ahation. Where's the repository? Oh, Rob. Rob. Yes, you asked me about this before. I'm sorry. I owe you some **[13:13]** [snorts] feedback on this. Um, yeah, you reached out to me. I'm sorry. There's a uh I need to I need to do a dive into this. This is something that uh Rob uh Ruiz who's uh spoken with me a number of times and asked me about this. Um and I owe him feedback on it. Um, I think like at a high level, I think anything based on create block is the right way to go because if you're using create block, you're going to be using what like the industry is using. So that's that's a great first step. That's my opinion. That's that's for sure. This **[13:44]** looks like it's super robust. It's a blog article and documentation page. Let's take a look. Blog documentation. Boom. Documentation. Bootstrap CSSEX browsers CSS JavaScript and custom blocks including scripts. Oh, nice. So, you have Okay, cool. cleaning your code with PHP editing. This is great. I'm I'm gonna I I'm going to read this and I'm going to get back to you on this and I do apologize for **[14:15]** not doing that sooner. So, um I'm just uh kind of lazy. Morning Paul. How's it going, Paul? Um so, like I said, I've got viewer callins active. So, if anyone's on Twitch and they want to jump on stream and just say, "Hey, you don't have to have anything to talk about. We we we can just, you know, chat. Nothing. It's not, you know, nothing formal. It's all good. Um, we're uh we're just hanging out." But any anyhow, okay, so WP Rigg is is a thing that I I I need to check out. I'm going to check that out. I I **[14:46]** promise you. Um, I'm also looking for votes on my YouTube channel. If you go to posts here, you can tell me what you want to see in 2026 or just give me an idea of what we're doing there. Um, oh, Paul Paul Baron coming in. All right, let's see. I've never done this before. Going to see what happens. I'm going to invite you, Paul. Oh, where'd you go? **[15:24]** Oh, okay. Here we go. All right. Paul, do you Paul, do you have a camera? I can't hear you or anything. So, show on stream. Here we go. Yeah, sure. Here we go. Paul, there he is. Am I streaming outside? No. Paul, are are you there, sir? **[16:00]** Okay, I can see you, Paul, but I can't hear you. >> One, two, three, four. >> Oh, there you are. All right, cool. Um, okay, chat, you tell me. Can you hear Paul? What are we looking at? Oh my Oh, what's this? Paul's Paul's linking his his Twitch thing. Oh, I don't want that. That's okay. All right. So, you're on stream there, Paul. I don't know if you can see yourself or not, but uh say hi to everybody and and **[16:31]** chat, let me know if you can hear this. This is the first time I set this up, so this is fun. But I want to make sure that you can actually hear what Paul's saying, and I can uh I can boost the audio if that's needed. Paul, can you say something for me? Troy Chaplan. **[17:02]** >> Chap. [laughter] >> It's Troy Chaplan. All right. What do we What's the luck? I am not streaming outside. I'm just uh I need a haircut and so I decided to wear a hat today. Managing insertion of code snippets. Easy way out. Yeah. Yeah. Yeah. For sure. Um Paul, I don't know. Are you hearing me? **[17:33]** Okay. I don't know what's going on with the audio. It popped into another window. All right. I don't know if Paul's hearing me or not, but if he is, cool. So, anyways, what what is this? What is this? So, Paul's talking about this is a plug-in proposal for insertion of code **[18:05]** snippets. Interest interesting. Oh, I can kind of hear you, Paul. You're pretty quiet, though. Let me see if I can boost your audio here. **[18:36]** Yeah, we opened up very quiet channel. Okay. >> And I can see >> Hey, Marcus Bernett. How's it going? All right. Well, Paul, you're welcome to hang out in the stream here with us today. We'll see how how it goes. So, what is this thing we're looking at? This is a plug-in proposal for managing snippets. So, I know there's a ton of plugins that do this, right? Um, **[19:09]** >> yes, but they all it's a single every single one of them is like here's the for Oh, but the echo is horrible. [laughter] >> Sorry. So, you're saying that Let me Let me just maybe turn my my music off. Individual plugins tend to support um just one snippet. **[19:41]** >> Oh, I see what you're saying. >> So, this idea is the you can take the base snippet. Yeah. >> And just paste it straight into this uh interface. We split it up. we make a settings page for those values. Um and and then we can control where on the page it gets gets and how it gets added. **[20:14]** >> Right? Okay. >> So we can then optimize the placement of the snippet. we maybe combine snippets together and if there are options for them. So like a lot of the chat bots have like colors, icons, things like that. We >> have an interface where people can actually adjust their look and feel. >> Right. Okay. **[20:45]** And so so also I'm going to s suggesting we support like JSON's JSON JSON file so people can put a JSON lump in yet to describe um and that would generate a settings page which people then could fill in. We could have a collection of JSON file JSON configurations that we preload and you just like click a button to to end that snippet. **[21:18]** >> It's just an idea. >> Okay. >> Yeah. Script blocks are all lots of options to be managed. So I mean I think I think probably like and and like Weston Weston's comment here is is sort of what was the first sort of comment that I had as well. I mean, this is just my, you know, initial reaction. Like, I have I hold no sway over whether things move forward or not, [snorts] but I would be concerned about like if being able to insert snippets, how you can **[21:49]** control the security around that. You know what I'm saying? because we split it up and you know >> we can actually control what is >> sorry say that again Paul there was a there was a a thing running over top you there and >> yeah and and is this is more this is **[22:21]** safer than just allowing someone to drop JavaScript into the head Right. But how is it? But okay, maybe I don't understand the implementation possibly. Let me just read this again. So create settings allow management of code simp control when and how they were added to rendered HTML. Add a sending a settings page that enables adding selecting script of script blocks and allows the options to be managed. There are lots of instructions. **[22:54]** Okay. So, okay. So, you're creating a a location to paste the snippet, then parse it, store it as a as a CPT or whatever. Create settings that control how it is loaded, adjust it. We also allow block JSON to be pasted as well to create a setting with options for the scripts that allow part of the settings control. Okay. Part of the settings control where the sims are added to the page or bundled into larger external file. Okay. So, **[23:24]** >> so the JSON describes the options for the snippet, >> right? So, what kind of like So, what would be an example? So, you have a you have a like so like and and again I may not be just not grocking this properly, but at the end of the day, this sounds like the ability to insert arbitrary code and then have it rendered in certain places. That's a that's a super distilled like you know no nuanced **[23:56]** um sort of description of that. Is that accurate? >> A li a subset of code um not anything >> right? But how how so how would how would we control how would you control? >> So someone wants to put in a like they want to they want to drop a scripty >> heyy >> oh my god it's the longest **[24:28]** >> that is the longest one so far it's crazy. Uh no you're not interrupting. It's all good. It was an automated thing I did. Um, so like what would keep somebody from putting a two some script tags with u some malicious code in there? Like how how would that be validated or would it be validated I guess is the question. >> Um, probably it is somebody could do **[24:59]** that. They were clever, but we could probably also put some in that certain things are not not allowed is valued because we actually pass the context. Um, >> right. Okay. I mean, that's a problem. >> How is this how is the risk any greater? >> Sorry, go ahead. And >> someone just pasting it into the header or the footer. **[25:30]** Um, it's not it's not I think it's I think I don't think it's any greater risk. I think it is um just core approved risk if that makes sense. >> If that's if if the intention is for this to be part of WordPress core, then we're giving people license to shoot them in the foot to shoot themselves in the foot by just dropping any random snippet. I mean, again, I I don't know the full scope of this, so I'm I'm not saying no, it's a bad idea. I'm just like wondering, you know, **[26:01]** >> it's it's a mad idea at the moment. >> I'm just >> Yeah. Okay. Well, cool. Well, I mean, I don't think it's impossible to do this, >> you know? I don't think I think I think it's it's sort of like >> it's the same reason why SVGs are so controversial in core, I think. Right. Um because it's very hard to make them safe. >> Yeah. >> Because there's so many permutations and iterate and and options and and things and like you know so I think we're kind **[26:32]** of treading in that territory. But what's Kevin saying? You totally tell me >> you can have custom GS runtime val code. I do it with my CSS plugin. Yeah. So that's I mean there I think there's technical solutions to this for sure. Um I think there's two questions. one is it is it a plugin or is it part of core? That's probably the the the big one. And if it's part of core, that's a huge uh conversation. It probably should start out as a feature plugin anyways, right? **[27:02]** Like that's >> Yeah, >> that would be my >> Yeah, >> you be able to iterate on it and to see if it becomes use. >> Yeah, for sure. >> Yeah. and.org would probably never accept a plugin like that. But if the intention is is is not plugin like that. >> Uh probably the JS runtime I think is what Kevin's talking about. Oh yeah, I I think Kevin's talking. So he has a J a custom JS runtime that validates the code. He has that with a **[27:33]** CSS plugin, right? And uh and I think he's referring to.org not wanting to accept a plugin that does that. not necessarily what you're trying to do, but like what what he was doing. He said took him took me a lot of effort to get the the CSS. So, um, but I mean, if it's a feature plugin, that's not >> I don't It's a cool idea. It's a cool idea. >> Paul, you've always got cool ideas every time I talk to you. Like, hey, let's parse all schema. **[28:05]** >> What's that? >> Yeah. Um and and we have a collection of like buttons that you can like search for snippets that are formatted Jason hand on it and so you could like select your chatbot you want to do creates a setting page. You fill the values in default values put your key in and bingo it works. And we can do things **[28:38]** like putting it in the footer wherever we can, >> right? >> Because the instructions always say put it in the head. >> Yeah. Yeah, I think that makes sense. Having a plug would be better, though. Yeah. Kind of like a plugin. Yeah. I mean, it sounds like um I mean, you know, you just got to get the Have you **[29:08]** started any work on it or is this just just an idea at this point? >> No. Um I want to knock it around. >> Oh, you made a wise choice, my friend. >> Thanks for the sub, Marcus. Appreciate you. Um that's awesome. Um yeah, we're doing viewer comments, too. So, if anyone else if all you need is a Twitch account and you need to be watching and then you can you can come on in and we can we can we can discuss whatever you want to talk about. There is a bit of a **[29:38]** delay though I think when I talk and then Paul you're you're hearing it a few seconds after me. So, it's sort of like when you see the the news anchors in another part of the world. So, I don't know. Maybe that's just way the way I have it set up. So, we'll figure it out. But, um yeah. So, if you want to jump on, just go do a call in through Twitch and you can come on talk with me and Paul and whoever else wants to join, chat about whatever. [clears throat] What else you working on today uh these **[30:08]** days, Paul? >> Um, still doing stuff on Matador Matador jobs. Still doing business. I actually Mhm. >> I went and had a look at the schema.org. Moved it forward a little bit. >> Oh yeah, that's cool. >> Uh yeah, there's a bit of a pull request **[30:38]** out there. Um >> Oh, it's like is this on my repo? I should just give you full access to it. Hold on. >> Yeah, it's a request to go to your repo. Okay, let's see what we can do here. Let's go take a look. Did Did you fork it or like I can just give you the the repository if you want. What's the thing called? Uh >> I forked it. >> Oh, you forked it. Okay. >> No, I prefer No, it's this one. **[31:14]** >> Oh, wait. Is is this the one? >> Should I do a pull request? >> No, I don't see a pull request. Unless it's >> Oh, let me do let me find do a pull request so you can see it. >> Yeah, you can defin I'll I'll I'll just merge it. [laughter] YOLO. I'll do a YOLO merge. All right, listen. Those folks that are on the stream that are not calling in, I **[31:46]** want you to call in right now. Come on, let's do it. Let's have fun. You don't even have to go on camera if you want. You can just do audio. Paul's the only brave soul here. [laughter] Wow. Is this from two years ago? Oh my god. >> All right. >> Is that Is that how long it's been since since we >> Yeah, it's a pull request now. >> Is there Okay, let's take a look here. you working here. Um, I I've got it showing out the content, **[32:18]** but I haven't got it doing the looping because we need to >> is this content object or a text field? And so we need to down the the data stack we've got so that we end up at the native text or number values. Right. >> Yep. >> All right. >> Um, so **[32:49]** >> but we're quite close. It really is getting >> Yeah, I haven't really uh I I I haven't really looked at it in a while. Where did we end up with this? I think we ended up with like Did we get an admin page? I don't remember how how how this all worked out. >> There's an admin page. Um, and I've made a block that that starts to show the inputs. **[33:24]** >> Oh, right. And doesn't it like Oh my god. Did Did you Did you do this or did I do this? I don't think I did this. Did I do this? >> Oh, maybe I did. I don't. >> So, that's this is generating patterns, right? >> I can't remember. I didn't remember. So, selected patterns. >> Holy jeez. >> Um, >> and some of this is AI generated. So, >> oh yeah. Yeah, that's probably that's **[33:54]** probably how I did it. If I did it variations, we got on your index. We got variations. >> I did. >> Oh, okay. was there there must have been oh one podcast I don't know cool well I hope that this is something that uh carries on that you're able to to work with >> I would love to work more on this in future **[34:24]** >> here oh right okay this is sort of like plugin controls h interesting Coolio. All right, I'm put my my music back on if that's okay with you, Paul. Got to have that heavy metal rocking. Um, turn it down. There we go. So, something I'm working on right now, and I don't know why this is doing this, but I'm working on um a **[34:56]** couple of blogs. So, like I said, this is um this is me going just diving head first into all things type T type script. So, um, as we know the the the blocks package, this is really annoying. Come on. Did this yesterday now? Now I know why it's not doing that. Why can't I find the name space react or JSX or element? >> You need to move me across the screen. **[35:28]** >> Oh. Oh, okay. Let me just uh let me just uh change that like this. How's that? There you go. Uh let's go across. Nah, let's go over here. >> There we go. >> That out of people's way. >> That's what we'll do. So, anyways, what I've been working on is I have this we're doing this project at uh from a job where we're we're building like a showcase of stuff for for Oh, Lord of Blood. He's calling in. All right. **[35:59]** Hold on. Here we go. Let's see what happens. [laughter] All right, let's see now. Better be wearing a shirt. Lord of Blood. Serge implementing our dev server. Oh, boy. All right. I don't know what what happened there, but uh I invited you, Lord of Blood. Get you in here whenever you show up. I don't know. Takes seems **[36:29]** to take a second. So, this is my first time doing it. We're all right, Troy, get your Twitch account open and jump on the call here, man. Let's do it. Let's do it. Y'all can tell me what I'm doing wrong with with my TypeScript. Oh, there's Troy right there. All right, here we go. Oh, this is getting crazy. We might have too many people. I'm excited. I don't know where you're going to show up. I'll probably have to move move this around. Um, anyways, Kevin, you'll know why. Okay. So anyway, so in WordPress uh for example in our um in in our blocks **[37:01]** package there there's no proper types, right? So we're running into some problems there. So uh like so annoying. Um so to get around doing this I' I'm I'm doing my own types. I'm I'm declaring a module and I'm adding all of my types in there. Oh, there's Troy. Let's just see. Previewing. All right. I'm going to just push you to **[37:32]** the call there. Where's Troy? Oh, better move you guys. Uh maybe I'll put you across the top. Is that There we go. Troy, are you talking? I think **[38:05]** >> Oh, there he is. I see you, Troy. Can I hear you, though? That's the question. Here, I'm turn my my my music up here. Troy, can you hear me? Okay. Can you hear me? Okay, Troy, >> I can. Can you guys hear me? >> There we go. Okay, I think I know what I was doing wrong. I can hear you. Um, I **[38:35]** think chat can hear you. Just go ahead and talk for a sec. >> Hello. >> Yeah. Okay. I think I think the problem is you're getting Yeah. All right. So, I didn't set this up properly. Lord of Blood, where are you? I don't see you in there. Okay. What What was happen? So, I' I've got this window uh behind the scenes here, and you all show up o o over here and stuff, and I had my my mic muted, and I think what was happening was you're hearing me delayed through the through the the the stream. And so, I I need to turn my mic on here so y'all **[39:05]** can can uh can hear me properly, I think, because there's no delay now, right? Doesn't seem to be, but I don't see your face. So, I can't see if there's a delay or not. >> Oh, you can't see my face. >> No, I can I can see Paul, but you're like It looks like your video is off. >> You're You're responding almost immediately after I'm I'm talking, which which was not the case with Paul because I think hearing me through >> the Twitch pop up. >> This is the the stream together thing **[39:37]** that I'm in. So, like I I manage this. You can. Yeah. A countdown from five. Well, if I turn my my video on, you'll you'll see me. Don't send. >> You'll see me. You'll see myself. And we don't need that. >> Nobody needs that. You can already see me. Um, but Lord of Blood, where you at, man? I saw you in there. And then did you get nervous? [laughter] If [snorts] it turns up turn the video in the app, you'll lose. Yeah. **[40:10]** Well, I can turn my camera on, but I don't want my camera on in the background here because I'll I'll I'll lose I I I did this before. Oh, I see. Lord, uh I did this with um Justin Tadlock once and I left my video running in this thing and then it just basically killed my bandwidth. So, I'm turning all the videos are off in here, but I can see you guys on stream through OBS and I'm assuming you can see me and we can talk. This is so much fun. [sighs] So, Troy, what was your meeting about? **[40:41]** >> Oh, we were just looking at implementing uh Surge on our servers just to get some some better full page caching going on. >> Nice, nice, nice, nice, nice. Oh, um, speaking of caching, I'm thinking about doing a stream on uh word on old like an old school topic that's near and dear to my heart is uh uh like like caching. So like the transient API, WP cache that all that stuff. I'm >> I don't know why. Oh, who is that? **[41:11]** >> Paul, do you just rip a fart? >> Do do you include the ability, you know, how to manage clearing caches? >> Clearing what kind of caches? Like transit caches or like >> one of the problems I >> um no page caches. So, one of the problems I have is that I have a form >> with a with a nons in it and that nons um gets expired and the b is cashed. **[41:46]** [snorts] >> Um >> so fails. >> Yeah, because it's cached. Um, can you update the knots on the form submit? Like can you how your So is your form is your form being done like is it being submitted through like Ajax or submitted through >> like a um >> because if what you can do >> submit back to the page I mean you could **[42:22]** but your your knots is being generated on the page right? So I don't I this might be a dumb idea but with the way that that we used to do it back in the day when I was at Tenup and we were working with VIP VIP has has extremely aggressive page caching. So you couldn't have anything on the page that that >> that was like dynamic in the sense of like user in information. So if you're a logged in user you couldn't like show it in PHP because it it would get cached. So a lot of times what it would do what we would do is we would load the page and then run JavaScript immediately to **[42:53]** update portions of the page that need to be updated based on the user. So you could do something like that because your knots is just it's stored in a in an input field, right? Like it's just it's stored in there. >> So you could do something like that maybe where the page loads and then once it's loaded the knots is updated with a like using Ajax where where you can generate the knots on you know and then insert it that way. I'm I'm I'm not I'm not sure. It's been a while since I've done that. I know that this this is a problem that has been solved. Troy, what **[43:23]** do you think? >> We have got some code doing that kind of >> Yeah. This is not an area that I'm really overly knowledgeable on. So, I'm not going to put my foot in my mouth and say something completely incorrect. >> Do it, man. Put your foot in your mouth. Do it. Just do it. Just um expose all of your nonsas in the console. That's the way to do it. Just have them all out there and all your API keys. That's That's the That's the correct way of doing it. [laughter] **[43:56]** >> Yeah. Just put all the API keys up there. Someone else do that so we can use them. Yeah. >> Exactly. Expose them to chat bots and to AI. It's the way to do it, man. Telling you. Um I I would try something like that, Paul. Um because I don't like I don't I mean >> Yeah. >> The thing is The other part is that >> really they're not truly numbers just once in >> sorry what's that >> in matador jobs we have a a a background **[44:29]** task which updates a list of jobs every 10 minutes um and so you need to clear caches regularly so that the new jobs appear otherwise recruiters get really confused Why isn't my job showing on the page? >> Yeah. No, no, no. That that totally makes sense. Um, >> yeah, I I I would I would probably try to refresh that section of of the page using JavaScript of some form, just **[45:02]** injecting the knots or or on form submit. >> Yep. >> Before like before the or Yeah. Well, yeah. I mean, you could do it with JavaScript as well, but then I mean, you need to have JavaScript enabled, but which is like everyone's site, but you could do something too that like when the form button is is submitted, you could get a refreshed version of that knots and then and then and then submit the form, you know. I don't know. I feel like I'm overthinking it. [snorts] I feel like I'm overthinking it. I am overthinking it. The L the L is saying **[45:34]** what? Nice to see. I discovered people doing some stuff in that Sorry, you've got code doing some of the stuff in the um in the submit process. >> Yeah. No, I stopped because I start hearing the echo. Um we we've got code that's doing some JavaScript to do refresh on. >> Okay. **[46:04]** >> But it's never perfect. >> Yeah. And [snorts] I don't I don't really know a ton about caching and and clearing and all that stuff. But one of the things we were looking at in the last couple of days with the surge plugin was just just testing to make sure like it it was cuz it clears the cache for each individual page as new content gets created. I don't know by looking at that code is something that you could pick up on from there that might work to solve some of the issues you're struggling with here. [snorts] **[46:37]** >> Okay. Yeah, the the love's got a good point, too, because I mean, if you have an Ajax request that's generating that for a non-logged user, then anybody can just get nons for your site. So, it's a little it's a it's a tough nut to crack for sure. >> Yeah. I'll drop the the link to that plugin in the chat. I saw this one a while ago. It's pretty good plugin. **[47:09]** >> [snorts] >> Do you have to cache the form? Like what if you didn't what if you I I guess page caching is controlled outside of your the plugin, right? like it it like you there wouldn't be a way to to accurately say I don't want this I I don't I I don't want this page cached like the user would have to do it because you because you could cache all **[47:40]** of the contents of the page using like a transient and cache the HTML so you're not doing lookups like Crazy. >> I'm not getting any audio. >> Go back to your type script stuff. >> Sorry. Were you not hearing me now? >> No, I am now. >> I wasn't before. **[48:11]** >> Okay. Um, cool. All right. Cool. Yo. Um, anyways, yeah, so the TypeScript stuff that I'm working on is uh basically trying to solve the problem of not having like um um uh React, sorry, what am I saying? Uh types and then trying to use types because that's not really a thing that you can do. Um so I'm doing this really badly, I'm sure. But basically what I'm doing is I'm converting everything to to to type TypeScripts and then I'm just **[48:42]** I'm creating I'm sort of I'm declaring the modules that that are missing types. And this has actually been a really little fun experiment because I'm I'm trying to learn to learn all the good stuff, right? Just want to say happy new year. Oh, sorry. Lord of Blood. Yeah, it' be good to have you on. You're having trouble getting set up with Twitch. That sucks. Well, you have some homework for next week. Um, but I'm I'm taking this course. I bought this course a while ago called **[49:12]** Totally TypeScript. It's kind of cool. Um, and so I'm totally totally Typescript by Matt PCO is is his name. I think Kevin told me about this guy. I don't know. uh he has a a cheat sheet for a um uh TypeScript config which is really cool but it's like all these workshops there's like tons of stuff like you're learning all about um lots of stuff **[49:42]** right now I'm on the mutability section where we can learn for example object property inference and recreating read only properties and things like that so it's it's kind of new and cool uh well this this was on sale a couple like last year I think and I I got it because I mean it's it's good. I will say that some of the things are like kind of like it's it's well here I'll show you I'll show you a uh like an example. So let's look at like one of the the basics. So let's go like basic types in in **[50:13]** TypeScript. So he has a little video he explains it all the video. I'll just jump in which is >> change things that are being assigned to this. >> All right. And then you do it all in the browser which is really cool. So like this is this is not right. Okay. So, we have to change that to number, you know, so on and so forth. And then he gives you the solution. So, it's it's pretty cool. Small little bite-sized things. I I'm quite enjoying it. I do think that some of the lessons are a bit like, okay, we've already learned that concept. Now, we're just kind of doing it in a slightly different way. But, but **[50:44]** that's the the simpler stuff. We're getting into more complicated things. Like, I learned about pick and omit, which is really cool. Something I had no idea about before. It's 2026 and I don't know anything about TypeScript. So that's what I'm learning right now. But and to do that I find it's better for me to learn on on projects, right? So like so I have the I have these two blocks and there there's going to be three blocks soon or than later. And so I'm just trying to get some ideas like just trying to in put the types in that I **[51:16]** need so like so this doesn't fail, right? Um, so I'm defining inside of my register block type in in the types of that that it's going to take a name and it's going to take some params. And so I have these register block params that I'm I'm defining. And I I love this partial thing because it means that if I didn't do partial, check this out. Everyone here is is going to know about this. So that this is yelling me because it's it's expecting things that aren't there. It's missing some stuff, right? **[51:47]** But they're all I don't need them because we don't always pass every single one of these parameters to the register block type. Right? So it's pretty cool. I'm pretty excited about it. Everyone everyone watching is like, "Yeah, okay, Ryan. Basics. Thanks. [laughter] Shut up." Um, I had to do the attributes better here though I think because >> go into core eventually. **[52:18]** >> Say again. >> Do you think the typing could go into core? >> Yeah, absolutely. I think we need it. Um, I I I'm actually working on helping to get that done. Um because the the thing the thing that we don't have so there is there's a ton of TypeScript in core but there's no TypeScript for some of the the blocks for the packages that extenders use. So the the us the **[52:49]** people that are building on building blocks building a lot of this stuff they don't have types. Um so that's part of what this is. Uh trying to get some of these these types. Well, yeah, there's there's a bit of that, too, Kevin. It's it really it's there's a lot it's just a ton of refactoring, right? Um I I agree with you. I I think the policy is anything new is being written in Typescript. Um, and then we're trying to address we're we're trying to address **[53:21]** um some like this is the original poll request where we're talking about getting stuff in in in into TypeScript. And there's some really great comments in in here that I would encourage you to read. The one thing like Dennis Nell, who's like the smartest dude in the planet, um had a really great um point in in in that like some of these some of these types um are so generic that it's almost like you might as well just use **[53:51]** any, which doesn't really help that much. But um so there's sort of there's there's a lot of conversation back and forth about whether or not doing like moving everything to TypeScript like a TS file or TSX file, right, versus output and core makes it hard to go for. Yeah, for sure. Yeah, I mean it's hard. It's very very hard. Like I like so this pull request so this original um pull request did a whole ton of TypeScript work and it kind of got basically shut down a little bit. Well, **[54:21]** not shut down, but just basically um uh it was deemed to be too big of a blift, I think. So, what I'm trying to do is I took the work that was done here and I move and I just pulled the types out. So, if and and my my my plan is is to peacemeal merge some of these types in so we can start getting them added and it it's done through through like doc blocks and stuff like that, right? So, that's how it's typed. So, there's a ton of this work that that's being done um **[54:53]** in a types folder and then we're just referencing those types in the in the original pull request. I think what they were doing was we they were doing the types and then they're also updating the the know the um yeah so like all of the doc blocks and everything were being were were being up updated as well. So, this is a good example of that, right? And so I think we need to get the types in in there first, get in and get that passing and then starting to add these types to the codebase as well and then **[55:24]** we'll get that done. I mean in the meantime I mean that there's another solution I think too where like we updated the the the packages on on on definitely typed or definitively typed whichever one that is but problem is those are so old that and there's been so many permutations. It's just better to get it in core because because then then once it's in core um because we'll get we'll we'll get type support faster. Um okay, how can I explain this? So if we **[55:56]** merge these changes into the package, that package gets updated every two weeks when Gutenberg uh when the release candidate for Gutenberg is is pushed out. That's when these packages get get released. So we'll get types support like super fast like before 7.0 assuming we let's say we merge this stuff up tomorrow we'll we'll we'll probably get it either next week or or the week after. So you you can install the package and and and have immediate type support, right? >> No, you're you're totally right. This is **[56:27]** a really good point. Uh where is that? Uh spotlight message like this is a great point. Oh, can't see it because I put this behind um over there. Let's do that. Sorry. Let's do that again. All new code is TypeScript anyways. Yeah. So, like Oh, not that one. It's this one. Uh probably **[56:58]** what Anyways, good point. Um not Yeah, but the thing is it's like it's it's there's a difference between So what I'm finding is there's very much a difference between um implementing it and using it, right? So if if that makes sense, like writing the types and and and adding them to the codebase is a much more complicated process than just ingesting those types when we're using them. Um because a lot of it's behind the scenes anyways, like you don't see it. So it does take a certain level of **[57:30]** expertise but one that I don't really have and that's what I'm sort of looking at trying to get myself to to the point where you know because this is this is the exact kind of pull request that like no one writing real code for Gutenberg like working on actual features is going to have time for. It's exactly what someone like me who's like you know a hack but is paid to help can can do and move this stuff forward. So that's hopefully that's something that I I I can get done sooner than later. Love **[58:02]** some help though. >> No, [snorts] >> that's going to be an interesting transition to see >> what to TypeScript. >> Yeah, I mean I we we kind of did that with our component library and and you know there was a lot of struggles, a lot of learning um validations and stuff and and just running checks and tests were failing left, right and center like there was a big learning curve there >> really. What was the So the tests like oh the test because you're using TypeScript >> like really like TTS >> using the whole Annie was a big problem **[58:34]** and and I I had to go back and like look at some of the old code that was a good year and a half ago I think we were really kind of struggling with that. So it it took >> fully typescript now >> in our component library not in our WordPress work right now. >> No no I mean but that's but but that's a start right? So, were you getting errors like any like can't use any because I think I think you can disable that in the TS config. I think >> that you can Yeah, you can. >> Yeah, I think there does there was a way to disable it. We we were trying to **[59:06]** learn it and and we kind of left all those things on at the time and >> yeah, >> you know, learn how to fix it properly. >> For sure. That's what I'm sort of uh uh doing as well. Like there's this thing in here that's driving me nuts and I can't figure out why this is doing that. Uh but I have this block params which takes an object and then then that object is yeah exactly any beats the purpose of of ts it's kind of like yeah that was a comment that Phil said but anyways so there's I have this block **[59:37]** params interface and it takes it it takes an object which is basically the attributes so the attributes can be whatever but when I pass it in here it's I I'm passing it in as an any which this is AI generated But if I to do do this and I pass it in as an object, which should be the type, I think it yells at me. Or maybe it doesn't yell at me. Let's see. Doesn't seem to be yelling at at me anymore. So So maybe it's fine. You see, I don't even know. **[60:08]** Uh maybe it's not a problem. All right. Well, doesn't seem to be a problem anymore. So maybe that's what I needed to do. But uh but yeah, so I'm fig I'm trying to figure out a lot of this stuff like what was the other one? The it was this block I think. Why is it zoom that in? You guys can read that. Um index. Oh yeah. See now now it's yelling at at me here. **[60:40]** I don't I don't quite get. So yeah, it's weird. Anyways, so I have to put it back to any and then it works, but I don't think that's what I want to do. Don't know. So I don't understand why this does that, but it it it makes it work. So this is the Yeah, that's the kind of stuff that that that drives me nuts. And then doing all this and having to figure this stuff all out, it's good times. **[61:12]** Um, when you uh the testing that you were running into, Troy, what like you >> Yeah. Oh. Oh, Kevin's answering. Kevin's answering. So, that's a generic type any like any like I know what any is. It means it could be anything. Like, should I be passing something like T in in there or I I just don't get why it's supposed to be an object. Well, you're passing that type into the other. Yeah, I'm passing **[61:43]** th this this Oh my god, did I just get raided? Sweet. Um, I just Sorry, I just saw my viewer list go like 10 million people just just showed up. Block params has a type param and expects a specific structure. Yeah, it does. Right. So, okay. So, Kev, talk uh talk me through this. Um, so this was **[62:16]** generated by AI for me. So, the idea is attributes. We don't know what attributes is. We only know that it's going to be an object. Now, I I I can't type it as an empty object because that'll fix, right? All right. So, this is a generic, right? And Troy, if you know the answer to this, jump in, too. Same with you, Paul. I feel like I'm talking I'm talking over everybody here, **[62:49]** but anyways, [snorts] >> I'm going through examples >> in my code to see if I can find anything. >> Cool. The Lup is going to join us here. Sorry, I just saw the call-in request. We're doing call-ins, viewer call-ins. So, if you have a verified Twitch account, you are welcome to jump on board. If I don't know who you are, I might not put your camera on [laughter] immediately. Uh, but that's only just to keep us from uh, you know, **[63:19]** bad things happen. All right, the lup is going to join us. Here we go. Welcome to the stream. Um, all right. This is fun. All right, Kevin. So, explain to me how I can make this work with any object. That's basically what I want to have done. I guess I could Well, the question is this is a generic, right? This is a generic. So, it's being passed. So, I can use attributes to **[63:52]** contain anything that's an object, right? params on edit has the signature that you need to match. Yeah. So it's defined by my block params. So it's attributes set attributes and is selected. Edit has a type. Edits type. Uhhuh. **[64:30]** So the thing is AI generated this connection for me and I don't understand it where I use it. So I use it uh basically here right. So this is so the edit is going to be right. It's just a component. So it's going to be using this here. So it's it's returning the ReactJSX element which is what it's supposed to do. Register block has a type. It does. Yeah. It's right here. So it's going to **[65:00]** have it's got my register and that and edit on that needs to match. Yeah. No, I I it I I I understand. So this is so register block type takes name and it takes a number of parameters. So I have a partial of register block pans because not every time I'm using it. Well, okay. If I remove this, it's yelling at me. Oh, cannot be empty. Okay. So what I'm thinking is this is supposed to be an object, right? I'm defining it as an object here. So it now it's not yelling at me, but it will yell **[65:30]** at me here. It's not yelling at me there either. I don't understand why it's not yelling at me now. Uh, it has an any type. It shouldn't have an any type because block params has got it is selected. Oh, no problem. The lup's trying to figure out the odd. If you move the end, this should So this doesn't error. This **[66:01]** doesn't error. Doesn't make any sense to me why that that doesn't error now. And then this is erroring because this is saying that it hasn't impressed any type. But it doesn't because this edit is being defined in here. Oh. Oh, wait. Do I need to hold on block attributes? Oh, that's what I have to do. Okay. That's what this is yelling at me over here because I need to do that and put **[66:32]** that right. >> I gotta go. I got a bail, guys. I have >> All right, Paul. Well, thanks so much for hanging out. >> Let's do it again. >> Yeah. Well, I think I might just do this every every uh how do I restart TypeScript? Just go restart. Can I just tell it to restart type script restart server boom let's see problems **[67:03]** two problems cannot find blog cannot okay uh the lup thanks for hanging out hey man how's it going I'm gonna just uh remove Paul thanks Paul >> hey hey can you hear me [clears throat] >> yep I I can hear you Hello everybody. >> Chad, >> can hear you. Thanks for joining us. This is awesome. I'm so excited that we're doing this. I can't tell you [laughter] how nerdy this feels. It's amazing. It's just amazing. Okay, so block attributes. I need to do a type here for block attributes. **[67:34]** This is the problem. Yeah, we'll we'll just we'll just not do that. We'll do Come on now. Here we go. So, block prams cannot find block I have to import block prams. Did I import blocks over here? It did. All right, we'll do that. We'll just import block ramps. Boom. Okay, so that's not yelling at me anymore. Yeah, sure. Great. Duplicate identifi. All right, so that's working. This is **[68:05]** This makes sense. So in my missing types, I have an object. So Kev, am I explaining this? like is this correct to think of it this way that this type that is being passed in here is supposed to be an object and so I tell it that it's an object here to match this this um type definition. I think that's what I'm feeling like it should be and maybe I'm wrong but **[68:35]** I don't know if I am. So there's that. So nothing here is yelling at me. I have no errors. So this is good. This is good. I'm very excited. The luck, what are you working on? >> Let's let's start with that. What you got? Anything that you can share? >> I'm so out of the I mean I'm working on totally different things than Typescript. >> Well, yeah. No, you don't. >> Probably. >> This is not a TypeScript focused stream. This is a >> It's probably under NDA. So, no. >> Oh, okay. [laughter] **[69:05]** >> Uh, but I was curious about I was curious about your opinion on this. social side um within the WordPress community because every time this subject reappears uh there's this discussion like there are Typescript uh enthusiasts there are one Typescript that like let's do it let's refactor everything and then there's this other side from Twitter that's oh no it's they are jumping for they're following **[69:35]** butterflies that's impossible it's never going to happen so like it's never going to happen in in in the sense of um >> like Sorry. So, so the there's the people that that want to go full TypeScript and then there's the people that don't want to go full typist or they're worried that that it's a fad sort of thing like is that >> Yeah. Yeah. Yeah. They they are worrying [clears throat] that it's just a trend. It's not going to stay for a long time **[70:06]** and so on. In my personal opinion, like I'm a centrist. I in my opinion, whatever is good for the contributor is good for the project. The important part is that people contribute. >> Yeah. No, I agree. I I don't think Typescript's going anywhere. I I don't know. I mean, it's been around a long time now. Like 11 12 years. like it's been a long like it's been around a long time if I may maybe I'm wrong with the amount of time but I just don't think **[70:38]** it's going to go anywhere. I think too that like it can be done in such a way where where you still like because you're just ingesting the types like from a from an extender point of view. You don't need to write in Typescript if you want to. It would be really great to have the types available, right? So I don't I I don't see it as a bad thing. It's not like it's coffe script or the next flavor of like we had the same conversation about React when React was chosen for the block editor, right? Like **[71:10]** well maybe Vue will will will be the next thing or Alpine or whatever, right? But I mean React's React's still here and it's probably going to be here for a a long time long after I quit doing this most likely. Um but and I think TypeScript's is is kind of the same the other but we we also have that escape hatch where I don't think you don't need to use TypeScript if you don't want to. >> So >> yeah but that that purpose [clears throat] of the architecture like that's the purpose of TypeScript. It induces the idea that everything you **[71:42]** will use as a parameter it has to be strongly typed so you know exactly what you are about to pass. So for sure this makes it hard for people let's say that maybe they don't know the entire architecture behind the u the entire structure of the code and and so on. So it's getting harder like to to come and contribute because you will have >> because it's typescript. >> Yes. because you will have to >> Oh, I see. **[72:13]** >> beh strict in your contribution. >> Yeah, I see what you're saying. Okay. So, there's there's a couple of parts to that, I think. And I mean, Troy, feel feel free to jump in here. Um, I think uh I think that like having types is a good thing. I mean, strictly typed code bases are good. PHP allows for it. I mean, there's like, you know, JavaScript has always been kind of the wild west because you could quite literally do **[72:43]** whatever you wanted to do and it never really mattered and you could just like, oh, that boolean, it's a string now. Oh, great. Awesome. Like, you know, and it caused a lot of weird problems, [laughter] but it also allowed you to do things that maybe you can't do in a in a in a different language. I think with lo like with the a larger code base, TypeScript becomes super important because especially when it's like people that aren't contributing all the time like if you have someone like George like >> oh you made a wise choice my friend **[73:13]** >> Mike Corkum what hi welcome um um if you have someone who's in lives lives in the codebase all the time they understand how things work you know maybe Typescript isn't that much that that that that that not as helpful for them. But if you're like a part-time contributor or somebody who's not that familiar with the codebase, I could see TypeScript saving a lot of problems because you don't know what that parameter is. Like here's an example. I **[73:43]** was working on a uh pull request to for the icon block to try to take uh Nick Diego's icon block and get it into core. I didn't make it in in in the 6.9, but part of what I was trying to do was add more block supports because we wanted them for height and width. And so that's not really a documented process because it's a very much core thing, right? And it's not TypeScript. It's just it's just like regular React. And it was really difficult for me to figure it out because I didn't know how any of this stuff worked. And so at least if like **[74:15]** I'm putting in a function and I'm not telling I'm not passing what it needs to to get TypeScript can kind of be like hey this is expected in here. So maybe that can probably help a little bit but it can also be wildly frustrating like wildly wildly frustrating because you don't know if you don't know TypeScript you're like I don't understand what any of these errors are. What the hell are these angle brackets? This makes no sense. It's dumb. Right. Um so yeah I I definitely get I definitely get both sides of it. I'm literally talking in circles. I'm like, "TypeScript's great, but it sucks, but **[74:46]** it's great, and then it sucks." So, it's like it really it's it's I can see why it's a little bit controversial. >> Yeah, the Lup is right. Like, it's I I think it's it's going to be a bit of a barrier for some folks in contributing because of that that lack of that knowledge that was there. I mean, AI is going to help kind of get over that gap rather quickly. Now, like when we had it, when we were starting on Typescript and and and we hit all of our trouble and and it was a lot of confusion there, we didn't really have the AI tools. We were just doing a more Google searches **[75:16]** trying to understand it. So, that made it more difficult. But I find now you can just, you know, toss it into co-pilot or, you know, whatever you're using this day and uh get over the hump. But but I I do wonder how many folks are going to kind of maybe step back a little bit more, you know, if they kind of hit that TypeScript thing, you know, I don't really want to go there yet or, you know, could go either way. >> Yeah. And part Yeah. And I think part of it too is that like from from my my viewport as a my my **[75:47]** point of view as a developer advocate, I think there's a real I think there's a need for people like me to be doing more things to explain this stuff. Like when a new API is released in WordPress, >> part of my job and and and other people job other people in in the community, their job is to be like, "Hey, this is how you use that that API and and and this is, you know, here are some examples and here's some stuff." We're not doing that [snorts] for with with TypeScript. Like I don't I think there's one place in the block editor handbook **[76:18]** that I can think of where they talk about TypeScript and how you would do it in Typescript, and it's the interactivity API. Um but um and it's just basic basic setup. So I think there's I think there's a bit of education. I mean you know because if the project wants people to come along then those that support the project and and and and are trying to support the uh you know the developers that that work with it. I think part of that that falls on my shoulders and other people like me, right? And like and the rest of us **[76:48]** like writing articles for the developer blog on on Typescript and why you should use it and you know that kind of stuff talks on like hey you know Typescript for the rest of us sort of thing like like you know why I hate Typescript and why you should use it like that's a great talk title actually that's a fantastic talk title. Um, but you know, stuff like that. I think I I you know, and it's the same with React. Like we're trying to teach a little bit of React with the block editor stuff, right? I mean, you can't teach everybody everything, right? like you have to know a little bit to be able to get in the **[77:19]** door. It does I can that's an interesting uh topic Phil for sure like the the >> I also think >> to entry >> there's a learning curve in the engineering life in the life in an engineer when you are at the beginning of your career you love a language like JavaScript for not being restricted you want you don't know what you want to do you want to be able to do this and that when you see errors or uh linting errors they're like I don't like that but then **[77:50]** you evolve and you say at that point you might say you don't like Typescript at all and then you start learning you you start evolving you keep learning and then you you will hit a point and I see this in many projects plugins or when they are trying to mimic TypeScript in their structure they will force parameters in uh documentation they will try to do some type of objects that have a specific ific structure and then they **[78:20]** will validate it or sanitize it in somehow uh and they will try to mimic at that point they try to mimic typescript they want a type uh way of doing programming [snorts] but they don't want to use type typescript and I think that's the the the learning curve of a programmer you start early you want the flexibility you learn you learn and then you you you realize that man the more flexible I let this function or uh class **[78:51]** be the more people will do crazy thing that I don't intend for them to do with this and >> exactly >> and then you go with the curve on the other side you come back and oh let's restrict this as much as we can and uh you then probably you are the kind of guy that says hey let's implement typescript and gutmer now >> yeah I mean I think what you're talking about like prior to types being able to do types in PHP like it was always **[79:22]** called defensive programming like check to make sure that that parameter is there and it's a string and check to do this and that and the other thing like like I always thought like you know being good defensive programmer was making sure the thing was defined before you used it and make sure it was the right type before you did it and like you know typed languages do a lot of that for you and it's the it's the code completion and it's the like there's a lot there that I really think helps but Yeah, again it's like you want the flexibility until you don't, you know, until you're in a million line codebase **[79:53]** and somebody changes a function parameter or or function definition adds another required parameter and then everything breaks and nobody knows why because they can't trace it down, right? So I don't know. >> Yeah, probably not a good idea to implement it on a large codebase all in one shot. It was a mistake. I've made that mistake several times. >> Yeah. Now you've actually got me thinking about whether or not I should take a take a have a go at trying to convert one of my plugins over to TypeScript just to see how that works out. >> Yeah, you thinking now? Well, I've tried **[80:25]** to do it a couple times with my advanced query loop plugin, and the the the fundamental issue that that you're going to run into is that the like [snorts] the types that you need, like the types that you are are are are going to need for if you want to turn all your all your files into TS files, the types that you're going to need are not provided by core. That's the problem. Like register block type, which you'll need if you're doing a plug-in with blocks, um doesn't have a type. and the types from dev from from from definitely typed are out of **[80:55]** date. And so now you're fighting all that stuff. So like Typescript isn't fun and it doesn't it doesn't really help if you're fighting the [clears throat] system just to do the work. Like that's that's that's something that I've kind of struggled with with Typescript a little bit is that oh my god I just spent three hours trying to figure out why these types are wrong and breaking when I and I haven't written a line of code for the thing I'm actually trying to work on. Um you know like I'm I'm all excited because I I I got my TypeScript **[81:27]** error to go away because I've I added some types and I didn't build anything. I just like got it to not squ have have squiggly red lines. So, I mean, yeah. And, uh, Kevin says he doesn't think that that you need many. And you probably don't. Like, depending on what your plugin is is doing, like if I were to look at my plugin, which I I would say is a fairly simple plugin in the sense of like what it's actually using. Uh, why is this not zooming in? Why is this not zooming in? **[81:58]** >> Now, you're are you registering your variation on this plugin in JavaScript or you doing it in PHP? Uh, oh, and and I'm doing it in it's all in JavaScript and I'm actually looks like I'm trying to do it using Oh, I'm on my TypeScript branch. [laughter] That's why I was playing around with trying to convert it, but I I mean like I'm already running into errors like okay, so these things aren't these don't have types. They may not be installed. Um, and so I know there's no types for blocks, which means that this thing will need to have **[82:29]** a type. So I have to I have to generate a type of this. Now, I I could just generate the type that I need just for my use case and move on. Like I I could literally just create a type that has that stuff and that's it. And then and then I' I' I'd be done. Um and then like the rest of it like the the rest of it is fairly straightforward, I think. [snorts] But I mean like I'm Yeah, I guess it depends on on what you're doing. And I I think I think some **[82:59]** of these these things like I don't need like I I don't have all the stuff typed out yet. But it's you know it's mostly just React components and typing parameters and doing all that. I mean I think it's I don't know. I think it's a good so in my case where I think it would become super helpful is when I'm doing stuff like post meta query controls um like the query what what they like um **[83:32]** what what am I trying to say here in my types I'm defining some types of like query props query attributes some of these queries are pretty big like there's a lot of props and a lot of things added and like my meta like when I when we're working with meta control um you can see there's like there's a list of queries and there's an an ID and I I have I have it defined here somewhere but I can't remember where it is but basically like it they're pretty complicated objects so having types in **[84:04]** there would be very helpful because then I don't have to remember what all that stuff is but again it depends on what you're doing I think so I'm I'm going to take another shot at this I think I I did this kind of backwards, but um that's sort of sort of my idea. But yeah, >> I think I think that the core team of WordPress still needs to take a a decision on this because this this discussion reappears often. >> Yeah, >> it's I think I [clears throat] think the **[84:36]** decision is new code is is written in in Typescript um as much as possible. Like if you were writing a new component, it'll be done in Typescript. Or if you're writing a new whatever, it it'll it's done in Typescript. The problem is we've got like I don't know what, five, six years of like non-Typescript code out there, right? Um Oh, Kevin's giving us all the code that we need to start our our um that's it. That's all we need according **[85:06]** to Kevin. Perfect. Done. No more type No more TypeScript is needed. Uh um it's it's the old stuff. It's the but it's the fundamentals. That's the thing. Like the block a block doesn't have really a TypeScript definition. It it it has a definition. I don't know if it's been typed, you know, and then like all the attributes for all of that all of that stuff. Like that's what we don't really have available as a type um to be imported from a package. And I I think **[85:37]** it's just like getting into the the weeds of DIT and just kind of working through it, right? So, block output attributes. >> Yeah, this stuff from Kevin looks pretty straightforward. >> Yeah. Well, you know, Kev's kind of a genius. Taught him everything he knows. I'm not gonna lie to you. [laughter] I am lying to you. **[86:07]** All right. [snorts] >> I think I that might be my weekend. I might convert one of my plugins to TypeScript just to try it. >> Yeah, I I I really honestly I am like my New Year's resolution besides losing weight, which is everyone's New Year's resolution, is to uh have every single JavaScript I file that I create and work on be in Typescript. um because that's the only way that I'm going to get really good at Typescript and I think that is a skill set that I **[86:37]** need um is to just it's just just to work with it and then I'll be able to identify the pain points that extenders have and then I'll be able to help address them. Right. >> Yeah, that was part of my problem with learning Typescript was just the frequency in which I was using it. For a while it was like every day for a couple months but then you know we switched gears and it was like more focused on the WordPress side like Gutenberg and it was we went really hardcore on that. So like for the better part of the last year I would say very consistently of my work and my personal work that I do it **[87:08]** was really all focused on Gutenberg and React and and JavaScript and I hadn't really touched TypeScript. So like I would go back now and I'd probably have to go and do some sort of a course of some sort to just a refresher. >> Yeah. Yeah. That's exactly where I am. Like I I have this course and I I I I got through it uh like last year and then but like I don't touch t I I don't do a lot with TypeScript like very basics but the the level of TypeScript that I'm operating at like the types can be inferred by Typescript like you don't need me to like you know like it's it's **[87:39]** a it's a string parameter like I don't think Typescript really can't figure that out right. So, so yeah, I think it's I think it's it's like anything. It's like if you want to get really good at something, you have to like you got to really do it. You got to just go and do it, dive into it. And this is going to be like a concerted effort for me to like, you know, only write stuff. So, I I I need a create block uh template, which I have somewhere that does TypeScript that takes everything and just puts it in Typescript because the cool thing about create block and the the scripts package **[88:09]** is you don't need to have a TS config. it it just works which is really great because that's a big part too is is trying to figure out all the TS config stuff and like um you know the the only workflow I don't have is having uh the TypeScript watch running and this the start package but if you're in like an IDE you don't really need to have it watching to to do it I think and I think that's just my mindset was that like I'm used to like um having like a watch command that does all my linting and **[88:41]** everything in there for me and the the IDE does it now. So, and that's probably just me having to like change the way I think of things, but you know, so >> the great part of it is that AI is doing great with typed uh languages. >> It really is. And I think I think it's going to help Gutenberg like very much like I I think once we start getting a lot more like TypeScript based code out in the world that is for blocks and for **[89:12]** you know working with the UI and slot fills and all all of that stuff. Um I think AI is going to get better at at giving good examples right that's we'll see that probably have to train some new models. How terrifying is it that the answers that we all put on Stack Overflow are have now been ingested in into models? [laughter] >> I'm I'm more afraid about the answers given to [laughter] >> Yeah. Yeah. Exactly. **[89:42]** >> I I'm afraid about those from >> the answer got Yeah. Yeah. [snorts] Exactly. >> That's funny. >> The part that has been trained with Reddit is the problem, right? >> Oh my gosh. Exactly. [clears throat and laughter] Um, just want to do a shout out for anyone that's out that's just joined. We are doing live viewer callins. So, if you want to jump on stream with uh myself, Troy, and the love, come on in. All are welcome. Um, all you need is a Twitch account and one **[90:15]** that's verified apparently. Um, yeah. So, come on in and you can chat TypeScript or whatever you want. Doesn't matter. We we can talk about whatever y'all want to talk about. Um, cool. All right. So, I have to figure out what Kevin was telling me about this. So, this is a very generic thing. So, um, blocks take this object. So, should I do like **[90:47]** maybe I need to define a type that looks like uh, what are we going to call this? Attributes. attributes attributes, right? And then it it you can do like the key is going to be a string, right? Because we don't know what it is. And this will be a string. No, this will be this is going to be an object. I forget how to do this now. **[91:22]** How do you How do you do the dynamic? Ah crap. I used to remember how Whoa. What was that? I have to look this up. How you do? Let's Let's go to my course. Where's that course I have here? That's not it. That's not it. That's not Where' it go? Whatever. Okay. TS dynamic **[91:53]** uh keys key string thing objects something like that. Does it have to be an interface to do that? No. So like this. That's another array of objects though. So that's what it would look like. And then um **[92:26]** trying to figure this out. Okay, so this the name of our attribute is going to be a string. It always is. And then this is going to be an object and it's going to have it'll have a type which is going to be string. Right? What was that? heard a little like poker music or something there. That was great. >> That was my son. I I gotta tell him to turn down the volume. My son is home today and he's listening. He's watching Spongebob. >> Oh, that's cool. He can watch He Tell **[92:56]** him to turn it up. I I love Spongebob. Okay, so the type is a string, right? And then what are the other what are the other things that we can put into a an attribute for a block? We got type is what? uh default and right and then what else? Oh, all this stuff. Okay, I'm not using any of that. So, I should just be able to do something like this, right? So **[93:27]** now, how do I how do I indicate that this is an object that contains multiple of these? Does anyone know off the top of your head? I don't know how to do that. Oh, Kev Kev's in the chat. He'll tell me what to do. So, this is telling it that it's it's going to be uh it's going to be have a have a key and it's an object **[93:58]** that has a type and a string in it. And then but I want to be able to tell the attributes might have multiples of of these. So, is there like a is there a way of doing that? Okay. Um I guess I'll Google it. Oh, you know what? Let's ask Chlo um how can I indicate that this uh type can have **[94:28]** uh more entries or does it automatically be inferred? It already does. So that's just saying okay. So that's unlimited. Okay. >> But you want I was asking if you want if you want multiple levels deeper. Do you want the object to be deeper and want define it this way? >> No, I just want the object to be able to be a series of strings followed by so so basically follow this. So attributes is **[94:59]** is is going to be an object and that contains a key which is a string and inside of that it's an object that that has a type type and it's of the the type string as well. So that should be what this is doing. So, if I pass this to here, is that going to do what I want it to do? Let's see. It seems seems to be that's not yelling me. Let's restart the TypeScript server. Did that actually do that? No. **[95:34]** Oh, did I just did that just do what I wanted it to do? Amazing. Now, let's let's let's test it and we'll say number. I don't know if that's going to yell at me or not. Is there a block type? Probably you probably just No, there isn't a block type. I haven't defined one. Ask that doesn't seem to be doing any Oh, wait. Hold on. Probably has attributes. Let's see. **[96:05]** >> All right. Well, it's not yelling at me, so That's going to be I guess what it needs to be. [snorts] I guess I I can just pass this straight into here too, right? I can just do something like that. [snorts] >> I should probably define a block type, but I I don't have one defined and I don't know if there is one defined in here. But Kev, this seems like it's the right **[96:36]** way of doing this, right? >> I don't know. >> In your type definition, you're you're setting your type, right? Do you do you not have to put in other stuff inside of there? >> Where's that? >> I'm just looking. If you go back to where you're you're defining the type, >> which which type? Sorry. >> The um your block attributes definition, I think it was. Oh yeah, right here. >> I'm going to put that in in into its own **[97:09]** type. >> Oh yeah. Okay, you did right there. Okay, because inside of there, wouldn't you put like uh you know, say if one of your attributes was URL, wouldn't you put URL equals URL or I guess >> Well, yeah. Yes, you could. But I think that that'll become a a pain because if so if if I do it this way like URL like um like this then this this is going to expect Why is it yelling at me? **[97:40]** >> Oh uh it's a string. Uh what the problem here is is is that I need to have URL in every single usage of >> wouldn't you put URL like underneath type because you're going to define types of your type there could be string it could be number it could be array like you could you could pipe a bunch of those in and have a bunch of different types in there but then inside of there wouldn't your attributes come underneath it and you define so you know say if you **[98:11]** have a source URL and it's uh you know it's a string >> oh I see what you're Yeah. Yeah. Yeah. Okay. I see what you're saying. So, this this this is too too generic. Like, it should be because the types are actually going to be the word string or the word number. Like, is that what you mean? >> Yes. >> The word boolean uh and then I guess it'll be array. I think that's it. Yeah, that's that that would be better because the type can can **[98:44]** be like it can be any one of these, right? Number object. Oh god, there's a ton. Um, so it needs to be one of these options, not just a string because I guess technically if I just type it as a string, it could just be that and that that that will be correct, >> but it's like it that'll be correct from a type point of view, but that won't be what we want, right? So yeah, is that what you're That's what you're asking me, right? See, this is **[99:14]** the kind of stuff that I, you know, I have to get better at. So this this makes more sense. >> It's interesting. I I've taken a few screenshots of what you're sharing and I'm running through chat as well and just trying to trying to wrap my head around it as well. >> No, this is great. I I mean, this is more correct because we we this type needs to be of the the type string, right? or number. And I wonder if I can test that if by putting something in. So in here I've got no where is it? I had **[99:46]** to close the wrong one. Pardon me. Sorry over there. Not that one. Um okay, we'll use this one. Not that one. This one. So in here we we've got this. So if I pass this as a um is that going to work? Like I don't know. That doesn't seem right. **[100:18]** No, that is right. The value of that is a string. Okay. Am I overthinking this? [snorts] Because the other thing that doesn't um well that is basically what the block attributes look like and this is going to be uh there is a default and the default is going to be a string as well. Right. I wonder if I get I don't get any **[100:49]** errors though because I'm not The thing is it's not it's not arrowing like I feel like this [snorts] that matches the example that the first answer on AI gave me here. >> Yeah. like we we >> oh we're we're we're um J2 trumpet we are fighting around with um uh with with TypeScript. Now the the thing is here **[101:21]** that by passing the this block attributes this isn't oh hold on hold on I'm not thinking of this correctly because the block attributes that get passed to here don't have anything to do with this block JSON like this type doesn't necessarily matter. I'm not validating this. I'm validating what's coming in to **[101:52]** the the edit because it's not an object that comes in, it's a value. You know what I'm saying? Does that make sense? So like in your edit, this doesn't come in as like like this is just a value. So attributes is going to be it should be more like this. So whatever **[102:23]** the key is it's going to be just a simple value that looks that I think that's more accurate. I keep looking at at at you guys like yeah is that right? Because this is just literally going to be the value of whatever the block attribute is. right in here because [clears throat] when when attributes get passed to the edit or the save component, they don't they don't like we don't know what kind **[102:53]** of type they are. That's not passed as information. It's just the value is is passed and I'm pretty sure they're always it's always passed as a string. >> Yeah, I think that that's true. Uh yeah, it's simply a way to tell the ID that hey the value that comes here in this it will be a string >> and that's how you delete it in in that function. >> Okay. So block attributes gets passed to edit. So in my edits see it's weird **[103:25]** because these this this should be erroring shouldn't it? block attributes. Now I'm trying to like break TypeScript. It's not working. So this this feels weird to me because this attributes is **[103:55]** being passed into my edit and the edit. So this is defining these attributes as as being some kind of key defi um which is a string followed by a num a number. So the value of whatever this is should be a number. But in my where I'm actually implementing this here I'm defining my block attributes as four strings. They're in here as strings. But this this should be yelling at me. Should it not? I think it should yell at you in execution like when you are **[104:28]** trying to load that in in the browser because >> I'm not sure >> TypeScript error though, right? Like it's it should be >> I don't know if if Typescript can know if that returned value from the edit function is on >> Oh, I see what you're saying. on the same structure like >> but I I bet that when you will execute that code it will error out it will see that it's a string is not a number and **[104:58]** it will >> really okay let's let's let's check that let's see do I have this I do close uh this one inspect console Maybe that. Okay. So, that's that's not doing anything. Okay. Well, I mean, [snorts] **[105:30]** it's not I don't know. Whatever. This is the kind of stuff that makes me like less and I just don't know what I'm doing. But like this feels like somewhere along the lines this should know that um what's being passed because I'm I'm defining my block at attributes as a type and I'm p I'm passing it here and so so this like where where is this? Oh. Oh, you know why? I think I need to **[106:06]** I think I might need to import that. Um I need to change the the name of this. Um attributes. So this this should be typed as should be typed is how do I type that like this? All right. **[106:40]** I need to pass the speed. I think that just needs to be passed in there, doesn't it? All **[107:15]** right, I'm gonna have to jump out, Ryan. >> My lunch my lunch break is over. >> Okay. Well, thanks for hanging out. Sorry, this has just been you looking at my TypeScript code. Shouldn't need to. What are you stuck on? Oh, Kevin, I'm stuck on everything. I'm stuck on. >> All right. Thanks, Troy. Thanks for hanging out. >> See you, bro. >> All right. So, I'm just uh unsure why this isn't erroring for me, but this feels more accurate um from a type point of view, but I'm **[107:47]** not going to get too hung up on it. And it's it's afternoon and anyway, so I think I might call it. Um thanks for hanging out with me. The luck, your last man standing. And anything you want to say before before we jump up? >> No, no. Have a great day. See you all. Mhm. Well, thanks for hanging out. Thanks for jumping on. Um, next week, Kevin, your turning. You got to get on here. Um, yeah. Cool. Awesome. Well, thanks everyone for hanging out with me today and, uh, help me fight through **[108:18]** some some TypeScript stuff. Great conversation about TypeScript. TypeScript. Yeah, I should definitely do that. Um, cool. Awesome. Well, thanks guys and gals and everyone hanging out with me today. I I will see you next week. You're the best. Talk to you all later.