Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
社内ツールから生まれたOSS "ts-remove-unused" によるフロントエンド開発の...
Search
LINEヤフーTech (LY Corporation Tech)
PRO
December 13, 2023
Technology
0
520
社内ツールから生まれたOSS "ts-remove-unused" によるフロントエンド開発の効率化と品質の向上
「UIT × Bonfire Front-end Meetup #1」の発表資料です。
https://uit.connpass.com/event/300284/
LINEヤフーTech (LY Corporation Tech)
PRO
December 13, 2023
Tweet
Share
More Decks by LINEヤフーTech (LY Corporation Tech)
See All by LINEヤフーTech (LY Corporation Tech)
LINEヤフー株式会社における音声言語情報処理AI研究開発@SP/SLP研究会 2024.10.22
lycorptech_jp
PRO
2
300
DETECLAP: Enhancing Audio-Visual Representation Learning with Object Information (Technical seminar on acoustic scene and event analysis)
lycorptech_jp
PRO
0
32
Language-based Audio Moment Retrieval (Technical seminar on acoustic scene and event analysis)
lycorptech_jp
PRO
0
30
Lighthouse: A User-friendly Library for Reproducible Video Moment Retrieval and Highlight Detection (Technical seminar on acoustic scene and event analysis)
lycorptech_jp
PRO
0
28
LeSSに潜む「隠れWF病」とその処方箋
lycorptech_jp
PRO
2
160
新卒2年目エンジニアがLINEギフトの保守性を高めるために取り組んだこと
lycorptech_jp
PRO
2
580
Trusted Types API と Vue.js
lycorptech_jp
PRO
1
1.4k
LeSSをはじめよう〜LeSSをはじめるとき、LeSSをはじめてから、知りたかったこと詰め合わせ〜
lycorptech_jp
PRO
2
300
合併後のインフラ環境におけるアラートフローの問題点洗い出しと改善をした話
lycorptech_jp
PRO
1
130
Other Decks in Technology
See All in Technology
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
AGIについてChatGPTに聞いてみた
blueb
0
130
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
フルカイテン株式会社 採用資料
fullkaiten
0
40k
AIチャットボット開発への生成AI活用
ryomrt
0
170
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
2
600
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
Lambdaと地方とコミュニティ
miu_crescent
2
370
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
120
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
270
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.3k
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
GitHub's CSS Performance
jonrohan
1030
460k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Building Applications with DynamoDB
mza
90
6.1k
Writing Fast Ruby
sferik
627
61k
BBQ
matthewcrist
85
9.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Transcript
,B[VTIJ,POPTV !LB[VTIJLPOPTV -:$PSQPSBUJPO ࣾπʔϧ͔Βੜ·Εͨ044 lUTSFNPWFVOVTFEz ʹΑΔϑϩϯτΤϯυ։ൃͷޮԽͱ࣭ͷ্ 6*5ʷ#PO fi SF'SPOUFOE.FFUVQ
HJUIVCDPNMJOFUTSFNPWFVOVTFE
. ├── node_modules/ ├── src/ │ ├── App.tsx │ ├──
Button.tsx │ └── Heading.tsx └── package.json ػೳͷհ
// src/App.tsx import { ReactNode } from 'react'; import {
render } from 'react-dom'; import { Button } from './Button'; const App = () => ( <div> <Button>click me</Button> </div> ); render(<App />, document.querySelector('#app')); // src/Heading.tsx export const Heading = () => <h1>My Sample App</h1>; // src/Button.tsx export const Button = ({ children }: { children?: ReactNode }) => ( <button type="button">{children}</button> ); export const label = 'button label'; #FGPSF
// src/App.tsx import { ReactNode } from 'react'; import {
render } from 'react-dom'; const App = () => ( <div> <Button>click me</Button> </div> ); render(<App />, document.querySelector('#app')); // src/Button.tsx export const Button = ({ children }: { children?: ReactNode }) => ( <button type="button">{children}</button> ); "GUFS
@@ -11,12 +11,7 @@ const App = () => (
render(<App />, document.querySelector('#app')); -// src/Heading.tsx -export const Heading = () => <h1>My Sample App</h1>; - // src/Button.tsx export const Button = ({ children }: { children?: ReactNode }) => ( <button type="button">{children}</button> ); - -export const label = 'button label'; %JGG
UTSFNPWFVOVTFEͱ FYQPSU͞Ε͍ͯΔ͜ͱͰؾ͖ͮʹ͍͘σουίʔυΛࣗಈͰআ͢Δπʔϧ w ;FSPDPO fi H w UTDPO fi HKTPOΛͱʹʮΘΕ͍ͯΔʯ͜ͱΛஅ
w ඞཁͳϑΝΠϧPQUJPOͰແࢹͰ͖Δ
τϐοΫ w Ϟνϕʔγϣϯ w 5ZQF4DSJQUίʔυΛม͢ΔͱͲ͏͍͏͜ͱ͔ w ม͢Δํ๏ w πʔϧ͕ͨΒͨ͠ޮՌ w
044Խ
Ϟνϕʔγϣϯ 5ZQF4DSJQUίʔυΛม͢ΔͱͲ͏͍͏͜ͱ͔ ม͢Δํ๏ πʔϧ͕ͨΒͨ͠ޮՌ 044Խ
Ϟνϕʔγϣϯ w ίϯϙʔωϯτϥΠϒϥϦͷஔ͖͑Λ͖͔͚ͬʹσουίʔυ͕ݦࡏԽ w ϞδϡʔϧͷґଘؔΛ୧Δඞཁ͕͋Γ؆୯ʹআͰ͖ͳ͍ w ࣗಈԽͰ͖Εຬ
Ϟνϕʔγϣϯ 5ZQF4DSJQUίʔυΛม͢ΔͱͲ͏͍͏͜ͱ͔ ม͢Δํ๏ πʔϧ͕ͨΒͨ͠ޮՌ 044Խ
ߏจ ίʔυߏจʹม͞ΕΔ export const message: string = 'hello world';
5ZQF4DSJQUίϯύΠϥ͕͍ͬͯΔ͜ͱ ߏจͷঢ়ଶͰܕνΣοΫ+BWB4DSJQUͷมॲཧ͕ߦΘΕΔ export const message = 'hello world'; export const
message: string = 'hello world'; ίʔυ ߏจ ߏจ ίʔυ QBSTF DPOWFSU QSJOU
5ZQF4DSJQUίʔυΛม͢ΔͱͲ͏͍͏͜ͱ͔ ߏจͷϊʔυΛՃɾআɾฤू͢Δૢ࡞Λॻ͘͜ͱ ߏจ ߏจ ૢ࡞
5ZQF4DSJQU"457JFXFS
Ϟνϕʔγϣϯ 5ZQF4DSJQUίʔυΛม͢ΔͱͲ͏͍͏͜ͱ͔ ม͢Δํ๏ πʔϧ͕ͨΒͨ͠ޮՌ 044Խ
5ZQF4DSJQU$PNQJMFS"1* ͕Δ͜ͱ ࣗͰΔ͜ͱ ύʔε ϓϦϯτ τϥόʔε τϥόʔε֤ͨ͠ϊʔυͷૢ࡞
5ZQF4DSJQU$PNQJMFS"1*Λ࣮ࡍʹͬͯΈΔ export const message: string = 'hello world';
import ts, { Node, ScriptTarget } from "typescript"; const code
= ` export const message: string = 'hello world'; `; const sourceFile = ts.createSourceFile( "src/index.ts", code, ScriptTarget.ES2022 ); const visitor = (depth: number) => (node: Node) => { console.log( `${Array(depth).fill("-").join("")}> [${ ts.SyntaxKind[node.kind] }] ${node.getText(sourceFile)}` ); ts.forEachChild(node, visitor(depth + 1)); }; ts.forEachChild(sourceFile, visitor(1));
-> [FirstStatement] export const message: string = 'hello world'; -->
[ExportKeyword] export --> [VariableDeclarationList] const message: string = 'hello world' ---> [VariableDeclaration] message: string = 'hello world' ----> [Identifier] message ----> [StringKeyword] string ----> [StringLiteral] 'hello world' -> [EndOfFileToken]
UTNPSQIͰૢ࡞͕ΑΓ؆୯ʹ w 5ZQF4DSJQU$PNQJMFS"1*গ͠ϋʔυϧ͕ߴ͍ w $PNQJMFS"1*ͷϘΠϥʔϓϨʔτίʔυΛݮͰ͖Δ w Α͘͏ૢ࡞Λؔͱͯ͠ఏڙ w ϩʔϨϕϧͳ"1*ʹΞΫηεͰ͖Δ UTNPSQIΛ׆༻͢Δ͜ͱͰΑΓεϐʔσΟʹ࣮ݱͰ͖ͨ
Ϟνϕʔγϣϯ 5ZQF4DSJQUίʔυΛม͢ΔͱͲ͏͍͏͜ͱ͔ ม͢Δํ๏ πʔϧ͕ͨΒͨ͠ޮՌ 044Խ
։ൃΛৼΓฦͬͯ w ࣾπʔϧͯ͢ͷέʔεΛΧόʔ͢Δඞཁͳ͍ w ίʔυϨϏϡʔͰ࣭Λ୲อ w ϥΠϒϥϦͷҠߦ࡞ۀΛߴԽ
ٴͨ͠ޮՌ w ϩδοΫʹઐ೦Ͱ͖ΔͨΊϦϑΝΫλϦϯάͷϋʔυϧ͕Լ͕Δ w ؾ͔ͮͳ͔ͬͨσουίʔυͷଘࡏ͕໌Β͔ʹͳΔ
Ϟνϕʔγϣϯ 5ZQF4DSJQUίʔυΛม͢ΔͱͲ͏͍͏͜ͱ͔ ม͢Δํ๏ πʔϧ͕ͨΒͨ͠ޮՌ 044Խ
044ԽͷܦҢ ϓϩμΫτͷϦϙδτϦʹ࣮ ݕূͰ͖ͨλΠϛϯάͰผϦϙδτϦʹΓग़͠ ࣾ/1.Ͱެ։ (JUIVCͰ044Խ
044ԽͷϝϦοτ w ࣾ֎Ͱ͕ࣗ࡞ͬͨίʔυΛ͑Δ w ࣾͷೝΛߴΊΔ͜ͱ͕Ͱ͖Δ w ۀ࣌ؒΛͬͯπʔϧΛվળͰ͖Δ w ࣾͷผϦϙδτϦʹల։͘͢͠ͳͬͨ
·ͱΊ w ϥΠϒϥϦͷҠߦͰൃੜ͢ΔσουίʔυͷআΛࣗಈԽ w ίʔυͷม͖ͭͭΊΔͱߏจͷมॲཧΛॻ͘͜ͱ w 5ZQF4DSJQU$PNQJMFS"1*ͦΜͳʹ͘͠ͳ͍ w πʔϧ࡞ΓϓϩμΫτ։ൃͷݱͰʹͨͭ w
044ԽͰࣾ֎ʹؐݩɾࣾʹల։
HJUIVCDPNMJOFUTSFNPWFVOVTFE