You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Enable support for TypeScript in components
Includes: compilation, translations, IDE support (use .tsx not .ts), typings, and other build tools. TypeScript component have to import PropTypes and React with `import * as React from 'react';`
This commit is contained in:
@ -237,7 +237,7 @@ const walkOpts = {
|
||||
const fullPath = path.join(root, fileStats.name);
|
||||
|
||||
let trs;
|
||||
if (fileStats.name.endsWith('.js')) {
|
||||
if (fileStats.name.endsWith('.js') || fileStats.name.endsWith('.tsx')) {
|
||||
trs = getTranslationsJs(fullPath);
|
||||
} else if (fileStats.name.endsWith('.html')) {
|
||||
trs = getTranslationsOther(fullPath);
|
||||
|
Reference in New Issue
Block a user