Java has methods, while TypeScript has functions. The two concepts are identical. It’s only the syntax that is different . JavaScript and TypeScript are much more flexible in terms of syntax than Java, so with TypeScript, you may see methods that don’t have a return type or don’t have typed method parameters.