GitHub Copilot Generates Code from Comments

GitHub Copilot can generate code based on comments and function headings provided by a developer. This example shows a TypeScript code file where a developer has typed comments indicating the sentiment of text, as determined by a Web service, will be returned (lines 5 and 6). The developer also provides the function heading (line 7), which indicates the variable “text” will contain the input string.

Become a DOM member or log in to read the full report