8 Commits

Author SHA1 Message Date
fbd5c9f014 NewTest 2025-09-18 22:02:33 +07:00
88313dbfe5 Update file 2025-09-18 22:01:42 +07:00
ad22917268 Merge pull request 'ErrorBranch' (#108) from ErrorBranch into main
Reviewed-on: #108
2025-09-18 14:56:26 +00:00
lam.pt
af9e54deb6 Merge branch 'ErrorBranch' of ssh://git.lampt.dev:2108/lam.pt/TEST into ErrorBranch 2025-08-29 11:15:45 +07:00
lam.pt
5adb236aef Xoá Comment 2025-08-29 11:12:30 +07:00
lam.pt
bb5a0840fe Add file 2025-08-29 09:44:52 +07:00
lam.pt
4372bcd160 Xoá file 2025-08-29 09:44:23 +07:00
lam.pt
da8b69577e add file lỗi 2025-08-29 09:40:12 +07:00
6 changed files with 174 additions and 1 deletions

32
error.js Normal file
View File

@@ -0,0 +1,32 @@
import React, { useState } from 'react';
function Demo(props) {
const [count, setCount] = useState('0');
function unusedFunc() {
return 'unused';
}
const name = props.username;
const arr = [1,2,3];
const list = arr.map(item => <li>{item}</li>);
const style = { color: 'red', fontWeight: 500 };
let result = value + 1;
setCount(count++);
return (
<div style={style}>
<span>Test</span>
{list}
<button onClick={() => setCount('abc')}>Click</button>
<p>{name}</p>
</div>
<h1>Unwrapped</h1>
)
}
export { Demo };

37
error.jsx Normal file
View File

@@ -0,0 +1,37 @@
import React, { useState } from 'react';
function MyComponent(props) {
const [count, setCount] = useState('0');
function unusedFunc() {
return 'unused';
}
const arr = [1,2,3];
const list = arr.map(item => <li>{item}</li>);
const style = { color: 'red', fontWeight: 500 };
let result = value + 1;
if (test) {
console.log('This will never log');
}
if (false) {
console.log('This will never log');
}
setCount(count++);
return (
<div style={style}>
<span>Test</span>
{list}
<button onClick={() => setCount('abc')}>Click</button>
</div>
<h1>Unwrapped</h1>
)
}
export { MyComponent };

26
error.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
use yii\base\Controller;
class SiteController extends Controller {
function actionIndex() {
echo $title;
$id = $_GET['id'];
$user = Yii::$app->db->createCommand("SELECT * FROM user WHERE id = $id")->queryOne();
echo $user['name'];
echo '<form method="post"><input name="test"></form>';
$model = new \app\models\User();
$model->name = $_POST['name'];
$model->save();
require_once('/var/www/html/config.php');
throw new Exception('Error!');
return true;
}
}

44
error.ts Normal file
View File

@@ -0,0 +1,44 @@
function add(a: number, b: number): number {
return a + b
}
const result = add('1', 2);
console.log(result)
let unusedVar: string;
function getString(): number {
return "hello"
}
let neverUsed = 123;
let x: any = "abc";
let y: number = x as number;
let a = 5;
function shadow() {
let a = "shadowed";
return a;
}
function noReturnType() {
return true;
}
interface User {
name: string;
age: number;
}
const user: User = { name: "A", age: "20" };
const arr: number[] = [1, "2", 3];
function unreachable() {
return 1;
console.log("This will never run");
}
function useAny(a: any, b: any): any {
return a + b;
}

35
error.tsx Normal file
View File

@@ -0,0 +1,35 @@
import React, { useState } from 'react';
type Props = { title?: string };
function App(props: Props) {
const [count, setCount] = useState<string>(0);
function unusedFunc(): string {
return 'unused';
}
const name = props.username;
const arr = [1,2,3];
const list = arr.map(item => <li>{item}</li>);
const style = { color: 'red', fontWeight: 500 };
let result = value + 1;
setCount(count++);
return (
<div style={style}>
<span>Hello World</span>
{list}
<button onClick={() => setCount('abc')}>Click</button>
<p>{name}</p>
</div>
<h1>Unwrapped</h1>
)
}
export { App };
const unused = 123;

View File

@@ -1 +0,0 @@
TEST