並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 67件

新着順 人気順

nested if else syntax in javascriptの検索結果1 - 40 件 / 67件

  • Google TypeScript Style Guide

    // Good: choose between two options as appropriate (see below). import * as ng from '@angular/core'; import {Foo} from './foo'; // Only when needed: default imports. import Button from 'Button'; // Sometimes needed to import libraries for their side effects: import 'jasmine'; import '@polymer/paper-button'; Import paths TypeScript code must use paths to import other TypeScript code. Paths may be r

    • The Prompt Engineering Playbook for Programmers

      Developers are increasingly relying on AI coding assistants to accelerate our daily workflows. These tools can autocomplete functions, suggest bug fixes, and even generate entire modules or MVPs. Yet, as many of us have learned, the quality of the AI’s output depends largely on the quality of the prompt you provide. In other words, prompt engineering has become an essential skill. A poorly phrased

        The Prompt Engineering Playbook for Programmers
      • Your URL Is Your State

        Couple of weeks ago when I was publishing The Hidden Cost of URL Design I needed to add SQL syntax highlighting. I headed to PrismJS website trying to remember if it should be added as a plugin or what. I was overwhelmed with the amount of options in the download page so I headed back to my code. I checked the file for PrismJS and at the top of the file, I found a comment containing a URL: /* http

        • JavaScript Best Practices | The WebStorm Blog

          IDEs CLion DataGrip DataSpell Fleet GoLand IntelliJ IDEA PhpStorm PyCharm RustRover Rider RubyMine WebStorm Plugins & Services Big Data Tools Code With Me JetBrains Platform Scala Toolbox App Writerside JetBrains AI Grazie Junie JetBrains for Data Kineto Team Tools Datalore Space TeamCity Upsource YouTrack Hub Qodana CodeCanvas .NET & Visual Studio .NET Tools ReSharper C++ Languages & Frameworks K

            JavaScript Best Practices | The WebStorm Blog
          • Writing a C compiler in 500 lines of Python

            A few months ago, I set myself the challenge of writing a C compiler in 500 lines of Python1, after writing my SDF donut post. How hard could it be? The answer was, pretty hard, even when dropping quite a few features. But it was also pretty interesting, and the result is surprisingly functional and not too hard to understand! There's too much code for me to comprehensively cover in a single blog

            • Moving off of TypeScript

              We Love You, TypeScriptFor nearly five years now, Motion has operated in a large TypeScript monorepo. At its peak, it was roughly ~2.5 million lines of code after excluding comments, node_modules, etc. To manage this, we used Vercel’s rather excellent Turborepo build system. This is not a blog post hating on TypeScript — quite the opposite! Motion would likely not even have survived until today wi

                Moving off of TypeScript
              • Prettier 3.0: Hello, ECMAScript Modules! · Prettier

                We are excited to announce the release of the new version of Prettier! We have made the migration to using ECMAScript Modules for all our source code. This change has significantly improved the development experience for the Prettier team. Please rest assured that when using Prettier as a library, you can still use it as CommonJS as well. This update comes with several breaking changes. One notabl

                  Prettier 3.0: Hello, ECMAScript Modules! · Prettier
                • Announcing TypeScript 4.7 - TypeScript

                  Today we’re excited to announce the availability of TypeScript 4.7! If you’re not yet familiar with TypeScript, it’s a language that builds on JavaScript and adds syntax for types. Types help describe what kinds of values you’re working with and what kinds of functions you’re calling. TypeScript can use this information to help you avoid about mistakes like typos, missing arguments, or forgetting

                    Announcing TypeScript 4.7 - TypeScript
                  • Prototyping in Rust | corrode Rust Consulting

                    Programming is an iterative process - as much as we would like to come up with the perfect solution from the start, it rarely works that way. Good programs often start as quick prototypes. The bad ones stay prototypes, but the best ones evolve into production code. Whether you’re writing games, CLI tools, or designing library APIs, prototyping helps tremendously in finding the best approach before

                      Prototyping in Rust | corrode Rust Consulting
                    • Announcing TypeScript 4.7 Beta - TypeScript

                      Today we are excited to announce the beta release of TypeScript 4.7! To get started using the beta, you can use npm with the following command: npm install typescript@beta You can also get editor support by Downloading for Visual Studio 2022/2019 Following directions for Visual Studio Code and Sublime Text 3. Here’s a quick list of what’s new in TypeScript 4.7! ECMAScript Module Support in Node.js

                        Announcing TypeScript 4.7 Beta - TypeScript
                      • Advancing Excel as a programming language with Andy Gordon and Simon Peyton Jones - Microsoft Research

                        Episode 120 | May 5, 2021 Today, people around the globe—from teachers to small-business owners to finance executives—use Microsoft Excel to make sense of the information that occupies their respective worlds, and whether they realize it or not, in doing so, they’re taking on the role of programmer. In this episode, Senior Principal Research Manager Andy Gordon, who leads the Calc Intelligence tea

                          Advancing Excel as a programming language with Andy Gordon and Simon Peyton Jones - Microsoft Research
                        • Hypershell: A Type-Level DSL for Shell-Scripting in Rust | Context-Generic Programming

                          Discuss on Reddit, Lobsters, and Hacker News. Summary I am thrilled to introduce Hypershell, a modular, type-level domain-specific language (DSL) for writing shell-script-like programs in Rust. Hypershell is powered by context-generic programming (CGP), which makes it possible for users to extend or modify both the language syntax and semantics. Table of Contents Estimated reading time: 1~2 hours

                            Hypershell: A Type-Level DSL for Shell-Scripting in Rust | Context-Generic Programming
                          • You Can Label a JavaScript `if` Statement | CSS-Tricks

                            Get affordable and hassle-free WordPress hosting plans with Cloudways — start your free trial today. Labels are a feature that have existed since the creation of JavaScript. They aren’t new! I don’t think all that many people know about them and I’d even argue they are a bit confusing. But, as we’ll see, labels can be useful in very specific instances. But first: A JavaScript label should not be c

                              You Can Label a JavaScript `if` Statement | CSS-Tricks
                            • Why Go's Error Handling is Awesome

                              Go's infamous error handling has caught quite the attention from outsiders to the programming language, often touted as one of the language's most questionable design decisions. If you look into any project on Github written in Go, it's almost a guarantee you'll see the lines more frequently than anything else in the codebase: if err != nil { return err } Although it may seem redundant and unneces

                              • WebKit Features in Safari 17.0

                                Sep 18, 2023 by Jen Simmons and the Safari / WebKit Team Today’s the day for Safari 17.0. It’s now available for iOS 17 and iPadOS 17. [Update September 26th] And now, Safari 17.0 is available for macOS Ventura, and macOS Monterey, and macOS Sonoma. Safari 17.0 is also available in the vision OS Simulator, where you can test your website by downloading the latest beta of Xcode 15, which supports t

                                  WebKit Features in Safari 17.0
                                • March 2025 (version 1.99)

                                  Update 1.99.1: The update addresses these security issues. Update 1.99.2: The update addresses these issues. Update 1.99.3: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the March 2025 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highligh

                                    March 2025 (version 1.99)
                                  • All JavaScript and TypeScript Features of the last 3 years

                                    TypeScript as envisioned by Stable DiffusionThis article goes through almost all of the changes of the last 3 years (and some from earlier) in JavaScript / ECMAScript and TypeScript . Not all of the following features will be relevant to you or even practical, but they should instead serve to show what’s possible and to deepen your understanding of these languages. There are a lot of TypeScript fe

                                      All JavaScript and TypeScript Features of the last 3 years
                                    • WebKit Features in Safari 17.4

                                      ContentsArchitectural improvementsWeb AppsForm elementsCSSWeb APIJavaScriptMediaSVGWebGLWeb AssemblyWeb InspectorChanges to SafariSafari ExtensionsWeb AuthenticationBug Fixes and moreUpdating to Safari 17.4Feedback Just like Safari 15.4 and Safari 16.4, this March’s release of Safari 17.4 is a significant one for web developers. We’re proud to announce another 46 features and 146 bug fixes. You ca

                                        WebKit Features in Safari 17.4
                                      • Weird Lexical Syntax

                                        I just learned 42 programming languages this month to build a new syntax highlighter for llamafile. I feel like I'm up to my eyeballs in programming languages right now. Now that it's halloween, I thought I'd share some of the spookiest most surprising syntax I've seen. The languages I decided to support are Ada, Assembly, BASIC, C, C#, C++, COBOL, CSS, D, FORTH, FORTRAN, Go, Haskell, HTML, Java,

                                          Weird Lexical Syntax
                                        • Golang Mini Reference 2022: A Quick Guide to the Modern Go Programming Language (REVIEW COPY)

                                          Golang Mini Reference 2022 A Quick Guide to the Modern Go Programming Language (REVIEW COPY) Harry Yoon Version 0.9.0, 2022-08-24 REVIEW COPY This is review copy, not to be shared or distributed to others. Please forward any feedback or comments to the author. • feedback@codingbookspress.com The book is tentatively scheduled to be published on September 14th, 2022. We hope that when the release da

                                          • Go 1.21 Release Notes - The Go Programming Language

                                            Introduction to Go 1.21 The latest Go release, version 1.21, arrives six months after Go 1.20. Most of its changes are in the implementation of the toolchain, runtime, and libraries. As always, the release maintains the Go 1 promise of compatibility; in fact, Go 1.21 improves upon that promise. We expect almost all Go programs to continue to compile and run as before. Go 1.21 introduces a small ch

                                              Go 1.21 Release Notes - The Go Programming Language
                                            • Mastodon: Ruby on Rails Open Source Web App

                                              The product https://joinmastodon.org Mastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones. On Mastodon, users can publish anything they want: links, pictures, text, and video. All Mastodon servers are interoperable as a federated network. Open source The project is open source at https://github.com/mastodon/mastodon License

                                                Mastodon: Ruby on Rails Open Source Web App
                                              • Parsing SQL - Strumenta

                                                The code for this tutorial is on GitHub: parsing-sql SQL is a language to handle data in a relational database. If you worked with data you have probably worked with SQL. In this article we will talk about parsing SQL. It is in the same league of HTML: maybe you never learned it formally but you kind of know how to use it. That is great because if you know SQL, you know how to handle data. However

                                                  Parsing SQL - Strumenta
                                                • Announcing TypeScript 4.7 RC - TypeScript

                                                  Today we’re excited to announce our Release Candidate (RC) of TypeScript 4.7! Between now and the stable release of TypeScript 4.7, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or use npm with the following command: npm install typescript@rc You can also get editor support by Downloading for Visual Studio 2022/2019 Following

                                                    Announcing TypeScript 4.7 RC - TypeScript
                                                  • Announcing TypeScript 5.4 - TypeScript

                                                    Today we’re excited to announce the release of TypeScript 5.4! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like typos, issues with null and undefined, and more. Types also power TypeScript’s edi

                                                      Announcing TypeScript 5.4 - TypeScript
                                                    • Announcing TypeScript 4.6 - TypeScript

                                                      Today we’re announcing the availability of TypeScript 4.6. If you’re not yet familiar with TypeScript, it’s a language that builds on JavaScript and adds syntax for types. Types help describe what kinds of values you’re working with and what kinds of functions you’re calling. TypeScript can use this information to help you avoid about mistakes like typos, missing arguments, or forgetting to check

                                                        Announcing TypeScript 4.6 - TypeScript
                                                      • January 2021 (version 1.53)

                                                        Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.53.1: The update addresses these security issues. Update 1.53.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Intel | Linux: deb rpm tarball Arm snap Welcome to the January 2021 release of Visual Studio Code. There are a number of updates in this version that we hope you wi

                                                          January 2021 (version 1.53)
                                                        • Zig, Rust, and other languages | notes.eatonphil.com

                                                          Having worked a bit in Zig, Rust, Go and now C, I think there are a few common topics worth having a fresh conversation on: automatic memory management, the standard library, and explicit allocation. Zig is not a mature language. But it has made enough useful choices for a number of companies to invest in it and run it in production. The useful choices make Zig worth talking about. Go and Rust are

                                                          • Prettier 2.3. In which assignments are consistent, short keys non-breaking, and Handlebars official · Prettier

                                                            This release focuses on fixing long-standing issues in the JavaScript printer. Be warned that, unfortunately, reformatting a project with the new version might result in quite a big diff. If you don’t use ignoreRevsFile to hide such wholesale changes from git blame, it might be about time. A remarkable milestone is the long-awaited release of the Ember / Handlebars formatter. It’s supposed to be t

                                                              Prettier 2.3. In which assignments are consistent, short keys non-breaking, and Handlebars official · Prettier
                                                            • Announcing TypeScript 5.4 Beta - TypeScript

                                                              Today we are excited to announce the availability of TypeScript 5.4 Beta. To get started using the beta, you can get it through NuGet, or through npm with the following command: npm install -D typescript@beta Here’s a quick list of what’s new in TypeScript 5.4! Preserved Narrowing in Closures Following Last Assignments The NoInfer Utility Type Object.groupBy and Map.groupBy Support for require() c

                                                                Announcing TypeScript 5.4 Beta - TypeScript
                                                              • A pipe operator for JavaScript: introduction and use cases

                                                                The proposal “Pipe operator (|>) for JavaScript” (by J. S. Choi, James DiGioia, Ron Buckton and Tab Atkins) introduces a new operator. This operator is an idea borrowed from functional programming that makes applying functions more convenient in many cases. This blog post describes how the pipe operator works and what its use cases are (there are more than you might expect!). The two competing pro

                                                                • Gleam JavaScript gets 30% faster

                                                                  Gleam is a type-safe and scalable language for the Erlang virtual machine and JavaScript runtimes. Today Gleam v1.11.0 has been published. 30% faster? Really? The title of this article makes a bold claim: Gleam compiled to JavaScript being 30% faster! Gleam doesn't add any additional runtime when compiling to JavaScript, and the generated code is very much like the JavaScript a human would write,

                                                                    Gleam JavaScript gets 30% faster
                                                                  • What's New in DevTools (Chrome 117)  |  Blog  |  Chrome for Developers

                                                                    Network panel improvements Override web content locally even faster The local overrides feature is now streamlined, so you can easily mock response headers and web content of remote resources from the Network panel without access to them. To override web content, open the Network panel, right-click a request, and select Override content. If you have local overrides set up but disabled, DevTools en

                                                                      What's New in DevTools (Chrome 117)  |  Blog  |  Chrome for Developers
                                                                    • Why Authorization is Hard

                                                                      Feb 2023 Update: Since writing this post in 2021, we've built, released, and GA-ed Oso Cloud: our opinionated solution for authorization. Two years ago, my cofounder and I started building security tools for infrastructure. We kept hearing that application developers were building their own homegrown authorization tools. At first we were a little skeptical. People have been building authorization

                                                                        Why Authorization is Hard
                                                                      • Blogged Answers: My Experience Modernizing Packages to ESM

                                                                        Random musings on React, Redux, and more, by Redux maintainer Mark "acemarke" Erikson This is a post in the Blogged Answers series. Details on the painful experiences and hard-earned lessons I've learned migrating the Redux packages to ESM Table of Contents 🔗︎ Introduction Redux Packages Background Packages and Configurations Issue History Early Attempts Migrating to Vitest Initial Alpha Testing

                                                                          Blogged Answers: My Experience Modernizing Packages to ESM
                                                                        • Building React + Vue support for Tailwind UI

                                                                          Hey! We're getting really close to releasing React + Vue support for Tailwind UI, so I thought it would be interesting to share some of the behind-the-scenes efforts that have gone into even making it possible. Grab some popcorn... The backstory From the day we started working on Tailwind UI somewhere in mid-2019 I knew that ultimately it would be 10x more valuable to people if they could grab ful

                                                                            Building React + Vue support for Tailwind UI
                                                                          • Announcing TypeScript 5.4 RC - TypeScript

                                                                            Today we’re excited to announce our Release Candidate of TypeScript 5.4! Between now and the stable release of TypeScript 5.4, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or through npm with the following command: npm install -D typescript@rc Here’s a quick list of what’s new in TypeScript 5.4! Preserved Narrowing in Closur

                                                                              Announcing TypeScript 5.4 RC - TypeScript
                                                                            • Balancing Old Tricks with New Feats: AI-Powered Conversion From Enzyme to React Testing Library at Slack - Engineering at Slack

                                                                              Update (October 2024): In response to numerous requests from external developers, we have open-sourced a version of our Enzyme to React Testing Library (RTL) conversion tool. You can now find it on npm, along with detailed instructions on how to integrate and use it in your projects. In the world of frontend development, one thing remains certain: change is the only constant. New frameworks emerge

                                                                                Balancing Old Tricks with New Feats: AI-Powered Conversion From Enzyme to React Testing Library at Slack - Engineering at Slack
                                                                              • Comparing Svelte and React - Jack Franklin

                                                                                March 9, 2021Comparing Svelte and ReactLast year I created Pomodone, a small time tracking application based on the Pomodoro technique of working in 25 minute intervals. It's a pretty basic app; it has a 25 minute timer (that runs in a Web Worker) and saves a history of your "poms" to a small Firebase database. I initially built it using React (well, Preact actually) but I then started to play aro

                                                                                  Comparing Svelte and React - Jack Franklin
                                                                                • Vanilla Hooks (outside React)

                                                                                  Photo by Vishal Jadhav on UnsplashHooks are a pattern, not something usable with React library only, and this post would like to explain, and walk through, some interesting possibility. What are hooks?Hooks are nothing more, and nothing less, than a wrap around a generic callback. The callback itself is not a hook, unless it’s being handled by a hook-helper, in this case provided by µhooks library

                                                                                    Vanilla Hooks (outside React)