pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/git/git/pull/2251/files

"anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-2d31826944fd3be8.css" /> [GSoC] userdiff: adding typescript pattern by Dhruv-0-Arora · Pull Request #2251 · git/git · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions t/t4018/typescript-class-method
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export class RIGHT {
unique = 0
constructor () {
this.doNothing()
}
function ChangeMe() { }
}
7 changes: 7 additions & 0 deletions t/t4018/typescript-export-default-class
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default class RIGHT {
private x = 0;
private y = 0;
private z = 0;
// ChangeMe
render() {}
}
7 changes: 7 additions & 0 deletions t/t4018/typescript-export-function
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export async function RIGHT(url: string): Promise<string> {
const a = 1;
const b = 2;
const c = 3;
ChangeMe
return url;
}
15 changes: 15 additions & 0 deletions userdiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,21 @@ PATTERNS("scheme",
"|([^][)(}{[ \t])+"),
PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$",
"\\\\[a-zA-Z@]+|\\\\.|([a-zA-Z0-9]|[^\x01-\x7f])+"),
PATTERNS("typescript",
/* Starting with optional whitespace */
"^[ \t]*"
"("
/* Followed by an optional export and/or async and/or default keyword */
"(export[ \t]+)?(default[ \t]+)?(async[ \t]+)?"
/* Followed by either a function or class declaration */
"((function|class)[ \t]+[a-zA-Z_][a-zA-Z0-9_]*[^{]*)"
/* or */
"|"
/* a variable declaration with const, let, or var */
"^(const|let|var)[ \\t]+[a-zA-Z_][a-zA-Z0-9_]*[ \\t]*="
")",
/* -- */
"[a-zA-Z_][a-zA-Z0-9_]*"),
{ .name = "default", .binary = -1 },
};
#undef PATTERNS
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy